Tech challenge
Install NPM packages
$ npm i
Setup your env keys
- Create a .env file and copy the .env.example file. You can change the DATABASE_URL based on your machine.
Create a local database with docker compose
$ docker-compose -f start-db-locally.yml up
- You can also start local db with setup-locally-db
Run migrations
$ npx prisma migrate dev
Run the app
$ npm run dev
- Note: this step requires Docker Compose to be installed on your computer
Start a local database memory server with Docker Compose
$ npm run setup-test
- note: The command above will already create your migrations on your memory server db
To run all test files
$ npm run test
To run a specific test file
$ npm run test /filepath/
After terminating the tests, drop the container containing the memory server Db
$ npm run docker:down
run your app
Navigate to http://localhost:port/api-docs