INNER CODE UNIT · JavaScript

getConfigFile

Lonero-Team/Decentralized-Internet · clusterpost/index.js:12

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

const startServer = async (cluster) => {

    var conf = getConfigFile();

    var tls;
    if(conf.tls && conf.tls.key && conf.tls.cert){
        tls = {
          key: fs.readFileSync(conf.tls.key),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…