- Create a
.envfile at the root of this repo. - Add the following env variables:
DATABASE_URL="file:./dev.db"JWTSECRET="{JWT encyption string here}"REFRESHTOKENSECRET="{refresh encryption string here}"PORT=3001
- Follow steps 2 to 5 below.
- delete ./prisma/dev.db to delete the DB instance.
- run
npx prisma migrate devto migrate the DB changes. - run
npm run buildto busild distribution folder. - run
node ./dist/mockData/generateTestData.jsto seed the DB with test data. - restart server with
node ./dist/index.js.
Pagination settings are set in the settings.ts file. A piece of middleware is used to protect every endpoint where pagination is an option to ensure that maximum page sizes are observed.