API template with unit and end to end tests, ORM set to multiple databases, endpoint documentation with OpenAPI, migrations and seed to populate the local databases, authorization with an API Key and authentication through Json Web Token.
Technologies used:
$ yarn install
# container
$ docker-compose up -d
# migrations and seed
$ yarn db:create
# start in watch mode
$ yarn start:dev
Access the API docs on localhost:3000/api.
$ yarn start:prod
$ yarn migrate
$ yarn seed
$ yarn db:reset
controller have an end to end test covering all the request layers. service have a unit test covering the service logic and mocking external things to it.
# all tests
$ yarn test
# unit tests
$ yarn test:unit
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov
- Author - Rafael Scariot