写法一:
写法二:
var app = require('express')();
app.listen(port)
写法二:
var app = require('express')();
var http = require('http').createServer(app);
http.listen(port);
为何可以这样写?
app.listen = function (port) { http.createServer(this).listen(port); };