npm i
or yarn
- Make sure to have a postgres DB instance running locally
- Run migrations π
npx prisma migrate dev
- Run seeds on local DB π
npx prisma db seed
- For any changes made on
prisma.schema
, remember to runnpx prisma migrate dev
locally in order to generate new prisma client and update migrations SQL scripts.
- Run all tests once, with coverage results π
npm run test
- Run all tests while developing with --watch flag π
npm run test:watch
- DEV π
http://dev.detoxify.ar/api
- PROD π
http://detoxify.ar/api
GET /health
All routes need Authorization
header with a valid bearer token provided to the user making the request.
GET /users
GET /users/:id
GET /users/:id/details
GET /users/:id/achievements
GET /users/:id/snapshot
PUT /users/:id
POST /users
POST /auth/login
POST /auth/register
TODO:
- Add TLS certificates
- Configure chron job to calculate user stats