Node.js boilerplate repo with: NestJs, Rest, GraphQL, TypeORM(Psql), Jest, Docker, Docker-Compose.
Nest based framework TypeScript starter repository.
- npm
$ npm ci
- build
$ npm run build
- run api -> from /docker dir
$ docker-compose up api
- run swagger
localhost:3000/swagger
Generate migrations:
- go into /docker dir
- go inside api container
$ docker-compose exec api bash
- run migration:generate command to update db schema
$ npm run typeorm migration:generate src/migrations/<migration_file_name>
- you can manually run migrations (migration:run command) but nestjs is set to runs automaticaly
$ npm run typeorm migration:run
Swagger config added to nestJs app
<domain>/swagger
from /docker dir
# unit tests
$ docker-compose run test-runner