脚手架安装
npm i -g @nestjs/cli
创建项目
nest new project-name
创建rest风格api
nest g resource resource-name
nest g resource resource-name --no-spec
创建模块
nest g module module-name
nest g module module-name --no-spec
创建控制器
nest g controller controller-name
nest g controller controller-name --no-spec
创建服务
nest g service service-name
nest g service service-name --no-spec
创建中间件
nest g middleware middleware-name
nest g middleware middleware-name --no-spec
创建管道
nest g pipe pipe-name
nest g pipe pipe-name --no-spec
创建过滤器
nest g filter filter-name
nest g filter filter-name --no-spec