UNPKG

try1

Version:

14 lines (10 loc) 337 B
var http = require('http'); http.createServer(function(request,response){ // 发送 HTTP 头部 // HTTP 状态值: 200 : OK // 内容类型: text/plain response.writeHead(200,{'Content-Type':'text/plain'}); //响应数据 response.end('Hello world\n'); }).listen(8888); console.log('Server running at 8888 port');