If we use
node to run Node.js script, it will block the current shell until it crashes or is forced to exit with Ctrl-C. But sometimes we might need to run this service in background or manage the Node.js
The traditional way is to use
$ nohup node hello.js > output.log &
Or you can choose some libraries such as daemon.node. So, if we already has the way to run service in background, what’s the benefit of using Forever?
Yeah…it’s “Hello World” again.
There are many ways to install Node.js, you can just choose whatever you like. We will talk about Windows environment later.
First of all, please make sure you have prerequisites. If you are using Mac, please make sure you have XCode.