this is my discord bot
https://stackoverflow.com/a/12949606
sudo npm install -g forever
forever server.js
forever start server.js Forever restarts your app when it crashes or stops for some reason. To
forever -m5 server.js
forever list Note the integer in the brackets and use it as following to
forever stop [id]
forever restart [id]
If you're working on your application file, you can use the -w parameter to restart automatically whenever your server.js file changes:
forever -w server.js