June 2013
Intermediate to advanced
236 pages
4h 33m
English
We have seen that if a worker process crashes, a new one can be forked by the master process, while the remaining workers can handle the current requests. But what happens when the master process itself crashes?
Uptime concerns are a unique aspect of Node apps, but with proper knowledge and the right tools this concern can be addressed to satisfaction.
Let's look at two popular tools for ensuring Express apps are up and running, with as little downtime as possible.
Ensuring a Node app is restarted when it goes down can easily be accomplished with the help of a Node package called forever.
Install forever as global module, so that we can use it as a command-line tool:
$ npm install forever -g
After forever is installed, type ...
Read now
Unlock full access