var http = require ('http');
http.createServer(function(request, response){}).listen(3000);
console.log('server has started...');
这样就成功开启了http的服务器,还可以看到命令台输出'server has started'。
var http = require ('http');
http.createServer(function(request, response){}).listen(3000);
console.log('server has started...');
这样就成功开启了http的服务器,还可以看到命令台输出'server has started'。