RS School REST service

Prerequisites

Downloading

git clone https://github.com/guest363/nodejs2021Q4-service.git ./

Installing NPM modules

npm install

Running application

Local

npm run start

After starting the app on port (4000 as default) 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/.

In Docker

Build image

docker-compose build

In 1-st terminal. It's compline ts files

npm run docker:watch

In second terminal. It's create network, volume and up image

npm run docker:run

Testing

After application running open new terminal and enter:

To run all tests without authorization

npm run 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>

Development

If you're using VSCode, you can get a better developer experience from integration with ESLint and Prettier extensions.

Auto-fix and format

npm run lint

Create migration

npm run typeorm migration:generate -- -n task8

Debugging in VSCode

Press F5 to debug.

For more information, visit: https://code.visualstudio.com/docs/editor/debugging