How to restart after bot crashes

I know is not JS related, but maybe is still one of the best places to ask. Sometimes user input error out. Im using ubuntu and nodemon the bot file. Anyone knows how to reboot automatically?
19 Replies
d.js docs
d.js docs•2y ago
Manage your application state with pm2 so you can restart, stop and delete processes dynamically: learn more
Jaworek
Jaworek•2y ago
^
Mulo
Mulo•2y ago
im using nodemon tho, is there another way?
Jaworek
Jaworek•2y ago
its pm2
Ashu
Ashu•2y ago
Hey, I got the kinda same question, check my latest post.
monbrey
monbrey•2y ago
Same shit. Just process.exit() and let the monitoring thing reboot it
Ashu
Ashu•2y ago
I tried process.exit() on linux, it doesn't kill the child processes
monbrey
monbrey•2y ago
yeah this question isnt about sharding though
Ashu
Ashu•2y ago
ya, can you help me in my latest post? #How to exit all shards and main process?
monbrey
monbrey•2y ago
Nope, I dont shard
Ashu
Ashu•2y ago
oh okay
monbrey
monbrey•2y ago
Please dont advertise your question in other peoples posts
Ashu
Ashu•2y ago
okay
monbrey
monbrey•2y ago
Not to mention you already opened two of them 👀
Ashu
Ashu•2y ago
ya they are 2 different things
Jaworek
Jaworek•2y ago
no don't do it
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Jaworek
Jaworek•2y ago
bc its bad practice
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View