/carbon-certificates-api

Primary LanguageTypeScriptMIT LicenseMIT

Carbon Certificates application API

Setup guide

Setup requires Docker

  1. run npm install
  2. create .env file at the root of this project and populate it with values from .env.sample (normally values shouldn't be kept in sample file, but for ease of setup and demo purposes, they're there.)
  3. run docker container build command docker-compose build and start it with docker-compose up
  4. run migrations with npm run typeorm -- migration:run, currently migrations also contain seeder values, which, given more time, should be removed into separate factories/seeders, using something like faker-js

Use guide

Once the docker container is running, assuming env has sample values, you should be able to access swagger docs at http://localhost:4005/api/docs/static/index.html#/, this contains all of the endpoints available at given time.

Accessing users

All user usernames can be found in migrations, Default passwords for all user are NotAPassword, stored hashed with salt, default password is also provided as an example on swagger schema

Running tests

npm run test