refresh config when config file modified.
npm install refresh-config
var Config = require('refresh-config');
var config = Config('./config.json');
config.on('error', function (err) {
console.error(err.stack);
})
config.on('change', function () {
console.log(config.data); // the new data object
console.log(config.stale); // the stale object
console.log(config.removed); // removed keys
});
MIT