Before all, you need to have ready your database.
Install dependencies
npm run install
Now you need to create a .env file and set up this variables.
- PORT : NodeJs port to listen.
- DB_HOST : URL to connecto to database host.
- DB_PORT : Database port.
- DB_DATABASE : Database name.
- DB_USER : Database user with right permissions.
- DB_PASSWORD : Database user password.
- JWT_SECRET : JWT secret for encrypt
If you are in development mode:
npm run dev
Run once of the following commands for make tests.
Run all tests
npm run test
Run test with coverage
npm run test:cov
Run test in watch mode
npm run test:watch