A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
# install modules *Required
$ npm install
# run migrations *Required
$ npx prisma migrate deploy
# sync dataBase with Prisma ORM *Required
$ npx prisma db push
# run all seeds to have basic information at database To run some tests *Required
$ npx prisma db seed
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# test coverage
$ npm run test:cov
# swagger
http://localhost:3333/api
# GET http://localhost:3333/test (to check if backend is up and running!)
no body required
# POST http://localhost:3333/user (to create user)
body:{
"name": "Marcos Mantovani", STRING;
"email": "teste@teste.com", STRING;
"password": "pass@sword123*" STRING;
}
# PATCH http://localhost:3333/user/:id (to update user info) access_token required
# header: Authorization: Bearer "access_token"
body:{
"name": "New Name", STRING
"email": "newemail@teste.com", STRING;
"password": "new@pass123*" STRING;
}
# GET http://localhost:3333/user/:id (to get user account information) access_token required
# header: Authorization: Bearer "access_token"
no body required
# DELETE http://localhost:3333/user/:id (to delete user account) access_token required
# header: Authorization: Bearer "access_token"
no body required
# POST http://localhost:3333/login (to validate email/password and get access_token)
body:{
"email": "teste@teste.com", STRING;
"password": "pass@sword123*" STRING;
}
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Marcos Mantovani
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed. dev