1、全局安装 koa-generator npm install koa-generator -g 2、使用命令行创建koa2项目 koa2 project // project是项目名称 3、进入project并安装依赖 cd project npm i