Node.js Server & Monitoring for File Changes

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.
(source: https://npmjs.org/package/forever)

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)

May 12th, 2016

  • Hi there, There’s certainly that your site could possibly be having internet browser compatibility issues.
    Whenever I check out your blog in Safari, it seems fine however, when opening in I.E., it
    has some overlapping issues. I simply wanted to provide you with a quick heads up!
    In addition to that, excellent blog!.

  • Your look is actually unique as compared to other individuals I’ve read stuff from.
    I appreciate you for posting when you have the means, Guess I’ll just book mark this page..

  • Thank you a lot for providing individuals with an extraordinarily spectacular opportunity to read from this web site. It’s always very terrific and also stuffed with fun for me and my office friends to visit your web site more than thrice every week to find out the new guides you will have. Not to mention, I am just usually satisfied with all the unique secrets served by you. Selected two areas in this article are rather the most suitable we have ever had..

  • I wish to express appreciation to you for rescuing me from this issue. Because of browsing through the world wide web and coming across solutions that were not powerful, I figured my entire life was over. Existing minus the solutions to the difficulties you’ve fixed as a result of the short article is a critical case, as well as ones which could have adversely damaged my career if I hadn’t noticed your blog. Your skills and kindness in taking care of every item was precious. I’m not sure what I would’ve done if I hadn’t come across such a solution like this. It’s possible to at this moment look forward to my future. Thanks for your time very much for your high quality and amazing help. I won’t hesitate to suggest the sites to any individual who should receive care about this situation..

  • Thanks a lot for this superb posting! I quite liked reading it.I will make certain to save the blog and will often return in the future. I would really like to suggest that you continue your fine writing, maybe try to think of showbox for android phone as well, have a fantastic afternoon!.

  • Thank you for each of your effort on this web page. Betty really likes setting aside time for internet research and it is easy to understand why. A number of us learn all concerning the powerful method you offer efficient strategies via this web site and as well boost participation from other individuals on the subject then our girl is undoubtedly studying so much. Take advantage of the remaining portion of the year. You’re doing a stunning job..