/copernicus-api

A fake banking API that's designed to be used in place of the Galileo API for testing purposes.

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Copernicus API

A fake banking API that's designed to be used in place of the Galileo API for testing purposes.

Built with the koa Node.js framework. Based on the node-typescript-koa-rest boilerplate.

Can be deployed to AWS Lambda (plus DynamoDB and API Gateway) with copernicus-lambda-deployer.

Can be installed from npm with npm install copernicus-api.

Requires either a real AWS DynamoDB back-end, or dynamodb-local.

Getting started

To work locally with this project, follow the steps below:

  1. Fork, clone or download this project
  2. npm install
  3. Copy .example.env to .env and set variables as required - set JWT_SECRET to a secret value, you can then go to https://jwt.io/ to generate a JWT based on that secret, you'll need to send that JWT in requests to the Copernicus API
  4. npm run create-tables
  5. Preview your project: npm run watch-server
  6. Go to http://localhost:3000/swagger-html/ to CRUD away at the API

Building

To build and run the project in JS: npm run build && npm run start

Testing

To run unit tests: npm run test

Publishing new releases

  1. Bump the version number in package.json
  2. npm run build
  3. npm publish

Built by Douugh.