var fs = require('fs');

// Require given configuration
if (fs.existsSync(__dirname + '/config/data.js')) {
  exports = module.exports = require('./config/data.js');
}
else {
  exports = module.exports = {};
}

var fs = require('fs');

// Require given configuration
if (fs.existsSync(__dirname + '/config/data.js')) {
  exports = module.exports = require(__dirname + '/config/data.js');
}
else {
  exports = module.exports = {};
}

Check and then use the same..
Check and then use the same..