We are finishing development of a project, the client is already using it but occasionally some errors occur - crashing the server.
I know I could register a service as 'upstart' script on linux, in order to have my node service restart when it crashes.
But our server is running other stuff, so we can't restart it. Well, actually, while writing, I realize I have two questions then:
you can also use nodemon .
npm install -g nodemon
nodemon will watch the files in the directory that nodemon was started, and if they change, it will automatically restart your node application.
Edit
sudo nodemon server.js