Skip to content

MichalJalowik/node_boila

Repository files navigation

Wire Edge Logo

Node.js boilerplate repo with: NestJs, Rest, GraphQL, TypeORM(Psql), Jest, Docker, Docker-Compose.

Description

Nest based framework TypeScript starter repository.

Installation and run

  1. npm
$ npm ci
  1. build
$ npm run build
  1. run api -> from /docker dir
$ docker-compose up api
  1. run swagger
localhost:3000/swagger

Migrations

Generate migrations:

  1. go into /docker dir
  2. go inside api container
$ docker-compose exec api bash
  1. run migration:generate command to update db schema
$ npm run typeorm migration:generate src/migrations/<migration_file_name>
  1. you can manually run migrations (migration:run command) but nestjs is set to runs automaticaly
$ npm run typeorm migration:run

Swagger

Swagger config added to nestJs app

<domain>/swagger

Test

from /docker dir

# unit tests
$ docker-compose run test-runner

License

MIT licensed.