1、nest 全局安装 指令
npm install -g @nestjs/cli
2、升级全局安装的nest版本 指令
有时候如果你想用最新的nest版本 ,但发现目前版本不是最新的 就可执行下面指令将全局nest版本更新到最新版本
npm update -g @nestjs/cli
3、nest项目创建指令
nest new 项目名
当然你也可以不用全局安装 直接使用下面指令创建项目 但还是推荐全局安装
npm install -g @nestjs/cli
4、nest cli指令
4.1、nest new
nest new 是用来创建一个新的nest项目
我们可以通过 下面指令来查询nest new 有哪些选项
npm new -h
Generate Nest application.
Options:
–directory [directory] Specify the destination directory
-d, --dry-run Report actions that would be performed without writing out results. (default:
false)
-g, --skip-git Skip git repository initialization. (default: false)
-s, --skip-install Skip package installation. (default: false)
-p, --package-manager [packageManager] Specify package m