/nodejs2021Q4-service

NodeJS backend service built with Fastify/NestJS with tests and Docker

Primary LanguageTypeScript

RS School REST service

THIS IS NEST APPLICATION. THE SAME FASTIFY APPLICATION STORED IN 'login' BRANCH.

Prerequisites

Downloading and installing

git clone git@github.com:MadaShindeInai/nodejs2021Q4-service.git
cd ./nodejs2021Q4-service
git checkout nestjs
npm install

Run in Docker

  1. Run docker desktop application
  2. Run "make up" or "docker-compose --env-file .express.env up"
  3. To create initial admin-user run "make admin-user" or "npx sequelize-cli db:migrate"

After starting the app on port 4000 you can open in your browser OpenAPI documentation by typing http://localhost:4000/doc/. For more information about OpenAPI/Swagger please visit https://swagger.io/.

Testing

After application running open new terminal and enter:

To run all tests without authorization

npm test

To run only one of all test suites (users, boards or tasks)

npm test <suite name>

To run all test with authorization

npm run test:auth

To run only specific test suite with authorization (users, boards or tasks)

npm run test:auth <suite name>

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.