Is there no way to run two or more instances of the same node script forever? If not, what is the best tool for that?
The best tool to run (at this time) is the same node process forever.
npm i pm2 -g
Start pm2 app.js -i 2
This will run two instances of the same app, even if your app opens the same ports pm2
uses both instances of the network to route network connections, to disturb you about clustering Not required, just open any port and it will work.
No comments:
Post a Comment