Hi! What's the best way to reload a node.js website? I mean, working with Apache/PHP if you just upload a new PHP file, all newcomers will use that file, without needing to restart/reload Apache. However, if you simply "kill" a node.js process and restart it, currently connected users will be in trouble, processes may be aborted in the middle, updates could be lost, etc.
I'm guessing that you could have a process running periodically, which would monitor loaded modules for updates and, if needed, "require(...)" them again after having done a "delete require.cache[...]". I've also found recommendations for "node-supervisor" and "nodemon", and I'm sure there must be some more out there. My only hard-and-fast requirement is that no connection is lost because of the restart -- connected users shouldn't notice any change at all, though I could stand a certain delay. What's the best way? Thanks, and best regards, Federico Kereki -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
