node安装express-generator脚手架

参考网址:https://www.jianshu.com/p/b555ba6f4067

全局安装:

  npm install express-generator -g

创建项目pro_test

  express pro_test

启动

  cd pro_test

  npm install

  npm start 

  node bin/www :运行项目 node bin/www 访问:http://localhost:3000/

使用npm可能比较慢可以安装全局淘宝镜像

  npm install -g cnpm --registry=https://registry.npm.taobao.org

  安装完成之后:命令使用cnpm进行构建

    例如:cnpm install express-generator -g

猜你喜欢

转载自www.cnblogs.com/zhizou/p/10583533.html