node starter
Run locally
Prerequisites
- nvm https://github.com/creationix/nvm#installation (install node v16)
- Docker
Important: Before starting development copy .env.example
to .env
and make changes for your local environment.
Initial setup
1. docker-compose
If you will be using docker-compose for local development, create a database volume.
docker create volume --name=postgres-data
If you change the name, also change it in docker-compose.yml
.
2. Generate JWT keys
Generate your JWT by running script scripts/generate_jwt_keys.sh
and copy the output to your .env
file.
Run the application locally
Install dependencies
yarn
Start database:
docker-compose up -d
Run the build (watch mode)
yarn build:watch
Run the development server:
yarn start:dev
Server will run on http://localhost:5000 (swagger-ui on http://localhost:5000/docs)
Run tests
Locally
yarn test
with coverage
yarn test:coverage
Optional dependencies
Deployment
Docker build
docker build -t <tag_name> .
License
This project is licensed under the terms of the Mozilla Public License Version 2.0.