This is a practice project from
鐵人賽:NestJS 帶你飛 | by HAO
Original author: HAO
based on nest-cli
# create project
nest new my-project
# *setup `.env` file from `sample.env`
# install dependence
npm install @nestjs/config // 環境變數模組
npm install @nestjs/mapped-types // DTO 映射型別技巧用
npm install @nestjs/mongoose mongoose // 與 MongoDB 互動用
npm install @nestjs/passport passport // 身分驗證模組
npm install @nestjs/jwt passport-jwt // JWT 與它的驗證策略
npm install @types/passport-jwt -D // passport-jwt 的型別定義
npm install passport-local // 本地身分驗證策略
npm install @types/passport-local -D // 本地身分驗證策略的型別定義
npm install casbin // 授權套件
npm install class-validator class-transformer // DTO 使用的裝飾器
# generate
nest generate module features/<new feature>
nest generate service features/<new feature>
nest generate controller features/<new feature>
nest generate guard core/guards/<new guard>
- script
npm run start:dev
A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
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 - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.