How to use the use function from nconf

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

28
29
30
31
32
33
34
35
36
37
  if (options.type === 'literal') {
    store = options.store;
  } else if (options.type === 'file') {
    store = JSON.parse(fs.readFileSync(options.file)); 
  }
  nconf.use(encrypt(name), { type: 'literal', store: encrypt(store) });
  return module.exports;
},
add: (name, options) => module.exports.use(name, options),
file: (name, file) => {
fork icon0
star icon3
watch icon2

15
16
17
18
19
20
21
22
23
24
25


var fluroHandler = require("./fluroHandler.js");
var printerHandler = require("./printerHandler.js");
var eventHandler = require("./eventHandler.js");
eventHandler.directory = MAIN_DIRECTORY;
var config = nconf.use("file", { file: MAIN_DIRECTORY + "/config.conf" });
var configs = {};
var states = {
    Config: false,
    Internet: false,
fork icon0
star icon0
watch icon2

+ 5 other calls in file