Issue
I built a node JS API that I use in an application. That API returns results from a database.
How could I do to make that API uninterrupted? Indeed, I used a nohup node index.js to run the webservice but it stops quite frequently..
Any help would be greatly appreciated, thank you.
Solution
there are about a gazillion reasons a process can "be interrupted", aka crash. You don't want to have an uncrashable process, rather one that is restarted automatically when crashed.
Have a look at pm2 for this.
Answered By - Tudor Constantin