var http = require('http');
var connect = require('connect');
var app = connect().use(connect.static(__dirname)); //or any other use
var server = http.createServer(app).listen(port, host, callback);
var connect = require("connect");
var server = require("http").createServer(connect());
server.listen(function() {
console.log(server.address()); // Print host name and port number.
});
2条答案
按热度按时间cxfofazt1#
很简单
w8f9ii692#
想明白了