与简单的nodejs任务发生死锁

Having deadlock with simple nodejs task

本文关键字:死锁 任务 nodejs 简单      更新时间:2023-09-26

嗨,团队我在下面有一个简单的nodeJS程序

  • 我已经在亚马逊服务器上创建了这个文件,我正在访问它从终端通过ssh
  • 这个程序运行良好,但如果我尝试从iphone浏览器(i意思是这个程序在aws服务器上运行的输出)我不能

var http = require('http');
var server = http.createServer(function (request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.end("Hello World'n");
});
server.listen(8000);

是否需要在服务器或程序上进行一些特定的配置

i am typing the url as http://serveraddress:8000/ from phone browser

确保您已允许流量通过AWS EC2管理控制台中防火墙(AWS EC2安全组)设置中的端口8000。