If you want the authenticated project version you just need to do the following steps:
- checkout to the correct branch:
git checkout base-auth - install the missing dependencies
npm ci - generate the prisma models
npx prisma generateand update the databasenpx prisma db push - configure your environment variables
HASH_SECRET|MAIL_USER|MAIL_PASS|MAIL_FROM|MAIL_HOST|MAIL_PORT|JWT_SECRET - run the application
npm run dev
The endpoints are:
- create user account
POST /v1/users
- name
- password
- resend confirmation code if needed
POST /v1/users/send-confirmation-code
- confirm your account
POST /v1/users/confirm-account
- code
- login
POST /v1/users/login
- password
- hello world authenticated
GET /v1/hello-world
- Header:
Authorization: Bearer <token-provided-on-login>
Simple tests
npm run testWatch tests
npm run test:watchBuild the project
npm run buildRun the project
npm run start