Is there a function in node.js that gives me all currently loaded modules - or even better, their filenames?
I want to restart my process as soon as a loaded module
Check the module module source. Your answer is:
module
Object.keys(require('module')._cache);