Nodejs
Express
Typescript
-
/api/v1/user
-
/api/v1/login
-
/api/v1/register
-
/api/v1/secret
:protected
-
Protected routes:
{ headers:{ authorization: <Token> }
the token will expire in 10 minutes.
yarn run watch
yarn run dev
yarn run format
- Swagger :
http://localhost:5000/api-docs
yarn tsoa spec-and-routes
Database client Postgres with (https://www.prisma.io/)
Under folder database:
docker-compose up -d
Project root:
yarn prisma generate
.yarn prisma migrate dev
.
Update migration schema:
prisma migrate dev --name add_description
.prisma migrate reset
.prisma generate
.