refresh node modules code example
Example 1: how to reload a module in node.js
delete require.cache[require.resolve('./path-of-file')];
require('./path-of-file');
Example 2: how to update all node libraries
npm install -g npm-check-updates
delete require.cache[require.resolve('./path-of-file')];
require('./path-of-file');
npm install -g npm-check-updates