标签:style http io ar color os sp java on
http://www.linuxidc.com/Linux/2012-10/72627.htm
see version
node --version
helloworld.js
var http = require(‘http‘);
server = http.createServer(function (req, res) {
res.writeHeader(200, {"Content-Type": "text/plain"});
res.end("Hello World\n");
})
server.listen(8000);
console.log("httpd start @8000");
run on DOS
node helloworld.js
enter the url in explorer
http://localhost:8000/
you will see "Hello World"
标签:style http io ar color os sp java on
原文地址:http://my.oschina.net/jayronwang/blog/355553