📜  nodejs 中的 http 模块 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:22.634000             🧑  作者: Mango

代码示例2
var http = require('http');

//create a server object:
http.createServer(function (req, res) {
  res.write('Hello World!'); //write a response to the client
  res.end(); //end the response
}).listen(8080); //the server object listens on port 8080