This is the submission for a code challenge. Read the instructions here.
Shift Pro MAX API
- Node 18
- Docker (PostgreSQL)
In order to run the project, you need to run the following commands:
mv .env.example .env
npm ci
npm run build
In order to have some seed data, you need to run the following commands:
npm run db:up # Remove the -d flag in order to avoid running in background
npm run prisma:init
if you don't want seed data, add the --skip-seed
flag to the prisma:init
command:
npm run prisma:init -- --skip-seed
In order to start the project, you need to run the following command:
npm run start
There is a swagger documentation available at http://localhost:3000/api-docs
For development, you can run the following command:
npm run dev
For running tests, you can run the following command:
npm run test
If you want to run an specific test, you can run the following command:
npm run test:unit
or
npm run test:integration
In order to run integration tests, you need a database up and running