-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
use pm2 start express project but can't access in browser #319
Comments
Is your node application working with It's not PM2 related, please don't write an issue without giving details about your server configuration, the pm2 version, the node version etc. ! |
I have found the reason, i have change my app.js to start server only when the process is master and not required by other file. when i use pm2 start it, the server is not started. I also have encounter the problem that pm2 stop can't stop the process. |
I can't understand your issue, please give more details. I close this one as non-constructive, feel free to comment. |
Here is my code if(!module.parent && cluster.isMaster){
http.createServer(app).listen(app.get('port'), function(){
console.log("Mobile Server listening on port " + app.get('port'));
});
} |
@Pana becuz none of the process started by pm2 is master |
I have the same problem. Can't load api run with pm2. |
I encountered the same problem. My server was working well as starting with |
I start a express service by
pm2 start app.js -i 3
, but can't access the service in browser.pm2 list
show the process is good.The text was updated successfully, but these errors were encountered: