Server Node.js during running is stored in memory, and in case some changes in the source code, we need to restart the process of Node.js program. In this situations we can perform restart server operation in manual way (by stop/start server process), but also we can automatize this process by using following file-watching tools, which are based on the watch() method from the core Node.js fs module and restart our servers when the some changes was processed.
• forever: Very good and usefull tool for use on the production server. Accroding to me, this is the most popular tool in the Node community. It keeps your application running after you disconnect from SSH session and, additionally, restarts it if it crashes.
• nodemon: For use during development of a node.js based application (source: https://npmjs.org/package/nodemon; GitHub: https://github.com/remy/nodemon)
• node-dev: Node-dev is a development tool for Node.js that automatically restarts the node process when a file is modified. In contrast to tools like supervisor or nodemon it doesn’t scan the filesystem for files to be watched. Instead it hooks into Node’s
require() function to watch only the files that have been actually required. (source: https://npmjs.org/package/node-dev; GitHub: https://github.com/fgnass/node-dev)
• supervisor: It runs your program, and watches for code changes, so you can have hot-code reloading-ish behavior, without worrying about memory leaks and making sure you clean up all the inter-module references, and without a whole new require system. Written by the one of the creators of NPM (source: https://npmjs.org/package/supervisor; GitHub: https://github.com/isaacs/node-supervisor)
• up / up-time: up has been renamed in npm as “up-time”. Zero-downtime reloads built on top of the distribute load balancer. Written by Express.js team (GitHub: https://github.com/LearnBoost/up)