express 安装完毕后需要安装express-generator

[livingbody@localhost ~]$ cnpm install express
✔ Installed 1 packages
✔ Run 0 scripts
✔ All packages installed (49 packages installed from npm registry, used 2s(network 2s), speed 49.51kB/s, json 48(109.61kB), tarball 0B)
[livingbody@localhost ~]$ express --help
bash: express: 未找到命令...

安装软件包“nodejs-express”以提供命令“express”? [N/y] n

[livingbody@localhost ~]$ cnpm install -g express-generator
Downloading express-generator to /usr/local/node-v10.13.0-linux-x64/lib/node_modules/express-generator_tmp
Copying /usr/local/node-v10.13.0-linux-x64/lib/node_modules/express-generator_tmp/[email protected]@express-generator to /usr/local/node-v10.13.0-linux-x64/lib/node_modules/express-generator
Installing express-generator's dependencies to /usr/local/node-v10.13.0-linux-x64/lib/node_modules/express-generator/node_modules
[1/5] [email protected] installed at node_modules/[email protected]@commander
[2/5] [email protected] installed at node_modules/[email protected]@sorted-object
[3/5] [email protected] installed at node_modules/[email protected]@ejs
[4/5] [email protected] installed at node_modules/[email protected]@mkdirp
[5/5] [email protected] installed at node_modules/[email protected]@minimatch
All packages installed (9 packages installed from npm registry, used 2s(network 2s), speed 46.33kB/s, json 9(16.66kB), tarball 81.66kB)
[[email protected]] link /usr/local/node-v10.13.0-linux-x64/bin/express@ -> /usr/local/node-v10.13.0-linux-x64/lib/node_modules/express-generator/bin/express-cli.js
[livingbody@localhost ~]$ 

 

你可能感兴趣的:(node.js)