Home > Enterprise >  Running multiple node.js projects on single linux server
Running multiple node.js projects on single linux server

Time:01-13

So I have 2 chat bots, one for Twitch and one for Discord, that I want to move from my PC to my linux based server so that they are just running all the time for convenience. Is there any way to do this?

Obviously I can run each bot by themselves on the server but I can't figure out if and how to do so.

CodePudding user response:

You can use a package like pm2 to run node apps in the background.

https://www.npmjs.com/package/pm2

sudo npm install pm2 -g

pm2 start your-app.js

You can use pm2 to start both apps, and they'll continue to run after you close the shell.

  • Related