API based on NestJS
- Authentication: Local and JWT strategies.
- Database: Postgres (using TypeORM)
- Endpoints:
- Healthcheck
- Users
- Utilities:
- Hash Manager: used for password hashing (with
node:crypto
) - Bad Request Factory: Maps ValidatorError(s) and transforms the final response payload.
- Hash Manager: used for password hashing (with
- Docker:
- local: for development
- test-integration: for integration tests
- live: for deployment (dev, staging, prod, etc.)
- CI: GitHub workflow with running tests (lint, coverage, integration).
- Duplicate the
.env.example
file, rename it to.env
and update the corresponding variables with valid values
bash docker/local/run.sh
# Run all unit tests
npm run test:unit
# Run specific unit test(s)
npm run test:unit -- <pattern>
# e.g.:
npm run test:unit -- file.manager
You need to have a valid
.env
file in the root of the project. The integration test suite uses this to mimic the behaviour it has during the CI runs
bash docker/test-integration/run.sh
Try using a meaningful name for your migrations
npm run migrate:create --name=<migrationName>
# e.g.:
npm run migrate:create --name=add_upc_to_product_variants_table