NodeJS学习笔记

通过js创建个简单的web服务器

var http=require('http');
http.createServer(function(req,res){
res.writeHead(200,{'Content-Type':'text/html'});
res.end("server is up!");
}).listen(8000);
console.log('listened on 8000');

 推荐学习:Node入门

posted @ 2015-01-04 11:48  ぶ会编程  阅读(126)  评论(0编辑  收藏  举报