From the node.js documentation:
Modules are cached after the first time they are loaded. This means (among other things) that every call to require(\'
If you always want to reload your module, you could add this function:
function requireUncached(module) { delete require.cache[require.resolve(module)]; return require(module); }
and then use requireUncached('./myModule') instead of require.
requireUncached('./myModule')