nodejs初探

var http= require('http');
var server= http.createServer(function(req,res){
res.writeHead(200,{"Content-type":"text/html;charset=UTF-8"});
res.end("<h2>我是标题</h2>")
});

server.listen(3000,"127.0.0.1");

posted @ 2018-01-27 17:26  \面朝阳光/  阅读(133)  评论(0编辑  收藏  举报