var express = require('express');
var app = express();
app.get('/', function(req, res){
res.send('hello world');
});
var server = app.listen(3000,'localhost', function(){
var host = server.address().address;
var port = server.address().port;
console.log("App is running at http://%s:%s", host, port);
})
转载于:https://www.cnblogs.com/luoye00/p/11170016.html
相关资源:node.js Express框架路由模块化