How to use the overrides function from nconf

Find comprehensive JavaScript nconf.overrides code examples handpicked from public code repositorys.

134
135
136
137
138
139
140
141
142
143
                config.redis.password = process.env.REDIS_PASSWORD;
        }
}

// Set overrides from container environment
nconf.overrides(config);

// Cleanup
config = null;
testSSL = null;
fork icon0
star icon4
watch icon4

38
39
40
41
42
43
44
45
46
47
      throw e
    }
  }
}

options = nconf.overrides(options).argv().env({ separator: ':' }).env({ separator: '_' }).get()
options.httpPort = options.httpPort || 2000

if (options.workerDebuggingSession) {
  debug('Debugging session is enabled')
fork icon200
star icon0
watch icon56

43
44
45
46
47
48
49
50
51
52
defaults: d => {
  nconf.defaults(encrypt(d));
  return module.exports;
},
overrides: d => {
  nconf.overrides(encrypt(d));
  return module.exports;
},
any: function() {
  let args = Array.from(arguments);
fork icon0
star icon3
watch icon2

1
2
3
4
5
6
7
8
9
10
const yaml = require('nconf-yaml');

//
// 1. any overrides
//
// nconf.overrides({
//      'always': 'be this value'
// });

//
fork icon0
star icon0
watch icon2