Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodejs 怎么保证的端口不挂掉 #2

Open
luanjinlong opened this issue Feb 8, 2019 · 2 comments
Open

nodejs 怎么保证的端口不挂掉 #2

luanjinlong opened this issue Feb 8, 2019 · 2 comments

Comments

@luanjinlong
Copy link

再本地开发中直接是 node app.js 打开了3000端口,但是你再正式站中是怎么处理的保证这个端口不挂掉呢?我有听说可以写一个守护进程监听,但是我不知道这个是怎么操作的。另外还看到资料说直接使用 supervisor 就可以了,但是不知道可不可行,不知道你是怎么处理的呢?谢谢

@CBDxin
Copy link
Owner

CBDxin commented Feb 21, 2019

再本地开发中直接是 node app.js 打开了3000端口,但是你再正式站中是怎么处理的保证这个端口不挂掉呢?我有听说可以写一个守护进程监听,但是我不知道这个是怎么操作的。另外还看到资料说直接使用 supervisor 就可以了,但是不知道可不可行,不知道你是怎么处理的呢?谢谢

我是直接 sudo forever start app.js

@luanjinlong
Copy link
Author

可以试下 pm2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants