nodejs学习第一天
//按照nodejs文档上第一页的例子敲了一遍运行了 迷茫 先这样吧 慢慢来
const http = require('http');
const host = '127.0.0.1';
const port = 3000;
const server = http.createServer((req,res) => {
res.statusCode = 200;
res.setHeader('Content-Type','text/plain');
res.end('Hello World\n');
});
server.listen(port,host,()=>{
console.log('Server runing');
})