INNER CODE UNIT · JavaScript

getConfigFile

Lonero-Team/Decentralized-Internet · clusterpost/src/clusterpost-execution/index.js:38

const getConfigFile = function (base_directory) {
  try {
    // Try to load the user's personal configuration file
    return require(path.join(base_directory, 'conf.my.json'));
  } catch (e) {
    // Else, read the default configuration file
    return require(path.join(base_directory, 'conf.json'));
  }
};

var confpath = __dirname;
if(module.parent && module.parent.filename){
    confpath = path.dirname(module.parent.filename);
}

var conf = getConfigFile(confpath);

try{

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…