繁体   English   中英

是否有其他选项可以在 ec2 实例上运行多个节点应用程序

[英]Is there any other option to run multiple node app on ec2 instance

我在文件夹中的节点 js 中有 3 个文件/应用程序

mis1.js running on port 3000
mis2.js running on port 3002
mis3.js running on port 3003

但是当我在 ec2 实例上运行它时它显示

ubuntu@ip-172-31-7-220:~/microservice$ node mis2.js 
Server running at http://localhost:3002/

但是在浏览器上我只能访问 3000 的应用程序

在我的安全组中,我允许所有端口 3000-3010

  1. 尝试使用sudo pm2 <entry file name>示例sudo pm2 mis1.js运行三个应用程序。 当您使用 cmd/ctrl C 时,它会杀死应用程序。
  2. 尝试在您的aws安全组上将 Ip 打开到“任何地方”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM