I do nodemon it's fine but too bad nodemon isn't restart the app when something happened.
Where's what i've tried in my ubuntu server :
npm install pm2 -g
pm2 start app.js
pm2 startup ubuntu
My app still has 502 bad gateway error. Sigh why does this happens? I do nodemon
it's running.. Strange thing is in the terminal pm2 did show an app and it's online :(
1) Check if your application is listed in PM2, use the command pm2 list
2) Running apps should be listed, you can either find an online
or errored
status for each app
3) If your app is online
, try to curl localhost:port
( if this works, something is wrong with your firewall or nginx / apache configuration)
4) If it is errored
, please check pm2 log - ~/.pm2/pm2.log '
如果 pm2.log 显示“...有太多不稳定重启...”,请尝试解决方案https://stackoverflow.com/a/30651668/3054511
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.