Restart process without having process manager constantly running
Install package:
npm install proc-restart
Require inside of your script and call it when you want to restart it:
const restart = require('proc-restart')
process.on('uncaughtException', (err) => {
console.error('Error occured:', err)
restart()
})
MIT © Konstantin Azizov