# generate .env file
$ cp .env.example .env
# generate JWT secret key and copy to JWT_SECRET variable inside of .env file
$ node
$ crypto.randomBytes(64).toString("hex");
# setup the local environment with Docker
$ docker-compose up -d
# troubles to get any service up and running because of port conflict
$ ps -aux | grep ${PORT}
$ sudo kill <PID>
# run again
$ docker-compose up -d
$ docker-compose exec api npm run typeorm:migration:run
- To facilitate the test in the migration process the user, task tables will be created and populates with some mocks users:
username: manager.test password: 123456
username: technician.test1 password: 654321
username: technician.test2 password: 123456
http://localhost:${API_PORT}/docs
- Do the authenticaion first
- copy and paste the token in the Authorize button to use the other two endpoints.
Consider to change the ports to:
- TYPEORM_HOST=localhost
- RABBITMQ_HOST=amqp://localhost:5672
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# unit tests
$ docker-compose exec api npm run test
# test coverage
$ docker-compose exec api npm run test:cov
Nest framework TypeScript starter repository.
Nest is MIT licensed.