Process Management

Anytime you run a program in your computer, it can fail for many reasons: maybe a server that it depends on is turned off or, even worst, an unhandled exception can tear down the running process. That's terrible for production applications as you leave your users without the server until you notice that it is not working.

This is where the process manager comes in, you can run your code behind a process manager and it will ensure that the process is always running. If something fails and crashes the program, the process manager will reset the entire application automatically.

There are two popular process managers for Node: forever and pm2, both work in a similar way; however, pm2 seems to be more popular and provides more utility ...

Get Mastering Backbone.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.