react学习
二月 12, 2018
本文总阅读量次
#node app123456789101112'use strict'//通过require将http库包含到程序中var http = require('http');//创建新的HTTP服务器var server = http.createServer();//通过request事件来响应request请求server.on('request',function(req, res){ res.writeHead(200, {'Content-Type':'text/plain'}); res.end('Hell World\n');});server.listen('80'); //监听端口console.log('Server running!');
查看评论