I am using the following very very basic script in a .bat file to keep a node.js server running on a windows machine.
: loop
npm start
goto loop
: end
However, if the server goes down, it does not restart automatically.
I do know that there are preferable ways of keeping the node up and running (example), but I really want to focus on other parts of the code at the moment and keep on integrating with other partners there. Thus, I am really looking for a very very simple bat file that can restart the server when it goes down (on Windows). What can possibly be wrong with the above one that I have?