Basic Express Website

1.Installing & Setting up Express

1.全局安装express:

1
2
$ npm install -g express
$ npm install -g express-generator

2.在目录下,使用命令express+projectName,创建初始化的express项目:

1
2
3
$ express projectName
$ cd projectName
$ npm install

3.运行服务:

1
$ npm start

4.打开浏览器:http://localhost:3000.