Express 安装¶ 1 2 3 4 5$ mkdir myapp $ cd myapp $ npm init $ entry point: (index.js) $ npm install express --save 使用¶ 1 2 3 4 5 6 7 8 9 10var express = require('express'); var app = express(); app.get('/', function (req, res) { res.send('Hello World!'); }); app.listen(3000, function () { console.log('Example app listening on port 3000!'); }); 1$ node app.js