快捷导航

NodeJs搭建 请问控制台显示http://127.0.0.1:1337/为什么在浏览器访问不到

varhttp=require('http');http.createServer(function(req,res){res.writeHead(200,{'Content-Type':'text/plain'});res.end("HelloWorld\n");}).listen(1370,'127.0.0.1');console.log('Serverrunningathttp://127.0.0.1:1337/');

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员1

请问我刚刚将端口号改为8080就能访问了是为什么
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP