Home > Net >  Is there a way to have a ubuntu server automatically restart a NPM process if it fails
Is there a way to have a ubuntu server automatically restart a NPM process if it fails

Time:04-21

I am running a Discord bot on AWS. Is it possible to have AWS redo npm start if for whatever reason the process stops running.

I couldn't find anything like this on AWS help center.

Thanks in advanced.

CodePudding user response:

I think something like PM2 should help you out.

From their description:

PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.

  • Related