0.0.9 • Published 4 years ago

@financial-times/tc-api-publish-adaptors v0.0.9

Weekly downloads
5
License
ISC
Repository
github
Last release
4 years ago

Treecreeper

Sandbox for working on the set of tools and services that make up the Biz Ops ecosystem at the FT

  • neo4j database
  • graphql api
  • rest api
  • ui components

This may become a monorepo for deploying a suite of packages for reuse by Biz Ops and other projects

Run

Prerequisities

Install dependencies:

make install

Start the neo4j community edition database. This requires the APOC procedures library to be added to a plugins directory:

./scripts/neo4j-plugins
make run-db

Troubleshooting

  • You may need to install wget in order to run ./scripts/neo4j-plugins. You can do this with brew by running brew install wget
  • If wget fails, visit https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases, download version 3.5.0.1 and save in ./neo4j/plugins
  • The make run-db command requires you to have an account with docker, (you should be able to do that here) and download the the docker application (you should be able to do that here)).

This can be done without docker if desired, by instead installing a neo4j database instance to the neo4j directory, the directory structure and scripts to run are the same as the docker configuration.

Note: The database will always need to run in a separate process/terminal to the node application

Running the application

make env run

This will download credentials, save them to an .env file, and start the node process on prt 8888. The endpoints are as documented for the production application, except that paths are not prefixed with /biz-ops. Copy the API_KEY from .env into a API_KEY header when sending requests. Note: this is not the same as the X-API-KEY used to authenticate with api-t.ft.com

Testing

make test

Will start jest in watch mode

Accessing the application from other local applications

The application runs on http://loclhost:8888. There are 2 differences in how the api is called compared to production environments:

  • the client will need to send an API_KEY header (not x-api-key). A value for this can be found in the .env file of this project after running make .env
  • all example urls in the documentation should have the /biz-ops stripped out
0.0.9

4 years ago

0.0.8

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago