新建便笺 3
node.js学习(1)1)安装 http://nodejs.org/download/下载。2)编写一个案例 var http=require("http");function onRequest(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello World"); response.end();}http.createServer(onRequest).listen(8888)3)运行后,在浏览器里,http://127.0.0.1:8888/查看效果