标签:
var http = require(‘http‘); //引用名称控件
server = http.createServer(function(req,res) {
res.writeHead(200,{‘Content-Type‘:‘text/plain‘});
res.end(‘hello world!‘);
}); //创建http server
server.listen(8000); //监听8000端口
console.log(‘httpd start @8000‘)
标签:
原文地址:http://my.oschina.net/u/2351685/blog/501779