Nemo

Nemo 关注TA

路漫漫其修远兮,吾将上下而求索。

Nemo

Nemo

关注TA

路漫漫其修远兮,吾将上下而求索。

  •  普罗旺斯
  • 负责帅就完事了
  • 写了1,495,102字

该文章投稿至Nemo社区   Js、Css、Html  板块 复制链接


【NodeJs】Http:原生实现

发布于 2016/08/01 21:49 1,025浏览 0回复 363


var http = require('http');

var server = new http.Server();
server.on('request',function (){
        res.writeHead(200,{'Content-Type':'text/html'});
        res.write('<h1>Hello</h1>');
        res.end('end');
});

server.listen(3000);

点赞(0)

上一个文章:【NodeJs】Http:get

下一个文章:【NodeJs】Http: 基本服务

点了个评