Is there any way I can run the nodejs program app.js always in the server even it crash? So I do not need to keep restarting node app.js by nohup
Asked
Active
Viewed 189 times
1 Answers
1
This question is not related to ethereum at all. Try using PM2 for your nodejs, there is auto starting option for nodejs applications.
Miroslav Nedelchev
- 3,519
- 2
- 10
- 12
-
Which is why the question is nominated to be closed. Also, it is stated in a comment to the question from about 4 hours ago. – goodvibration Mar 23 '20 at 09:43
-
I written an ethereum script in node but it always crash after some time, can I use PM2 to restart it automatically? I checked the commands on PM2 but the only restart it when the file is modified it does not specify whe the file crash or stop. – Louis Mar 25 '20 at 00:06