4 个回答

代码不发出来?

node.js版本太旧了吧,升到8.5.0再试试?

同求答案,大佬们
我的代码:var
http = require("http");

http.createServer(
function

(req,res){

200,{"Content-Type":
"text/html"} ;

res.write("<h1>Node.js</h1>");

res.write("<p>Hello World</p>");

res.end("<p>beyondweb.cn</p>");

}).listen(3000);

console.log("HTTP server is listening at port 3000.");

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题