i am using pm2 in production apps
will pm2 restart terminate ongoing rest api's?
If yes then Is there a workaround for not terminating the existing Rest API's when pm2 restart.
You'll want to use cluster mode (-i 4
) and pm2 reload
to do zero downtime deploys.
There's a guide that goes in depth over things over here: https://futurestud.io/tutorials/pm2-cluster-mode-and-zero-downtime-restarts