1、通过下面命令建立站点基本结构:
<span style="margin: 0px; padding: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 21.6000003814697px;"><span style="margin: 0px; padding: 0px; color: rgb(0, 0, 255);">express -e microblog</span></span>
当前文件夹下出现了子文件夹microblog,而且产生了一些文件:
create : microblog
create : microblog/package.json
create : microblog/app.js
create : microblog/public
create : microblog/public/javascripts
create : microblog/public/images
create : microblog/public/stylesheets
create : microblog/public/stylesheets/style.css
create : microblog/views
create : microblog/views/index.jade
create : microblog/views/layout.jade
create : microblog/views/error.jade
create : microblog/routes
create : microblog/routes/index.js
create : microblog/routes/users.js
create : microblog/bin
create : microblog/bin/www install dependencies:
$ cd microblog && npm install run the app:
$ DEBUG=microblog:* ./bin/www
它还提示我们要进入当中执行npm install。
无參数的npm install 的功能就是检查当前文件夹下的package.json。并自己主动安装全部的指定的依赖。