[root@XXX testdapp]# express -e MyDapp bash: express: 未找到命令...
首先我是使用了npm install express -g命令安装了express,之所以会失败是因为还需要下面的命令
npm install -g express-generator
这时候再去创建一个项目的时候就成功了
[root@XXX testdapp]# express -e MyDapp warning: option `--ejs' has been renamed to `--view=ejs' create : MyDapp/ create : MyDapp/public/ create : MyDapp/public/javascripts/ create : MyDapp/public/images/ create : MyDapp/public/stylesheets/ create : MyDapp/public/stylesheets/style.css create : MyDapp/routes/ create : MyDapp/routes/index.js create : MyDapp/routes/users.js create : MyDapp/views/ create : MyDapp/views/error.ejs create : MyDapp/views/index.ejs create : MyDapp/app.js create : MyDapp/package.json create : MyDapp/bin/ create : MyDapp/bin/www change directory: $ cd MyDapp install dependencies: $ npm install run the app: $ DEBUG=mydapp:* npm start