Always available, remotely updateable config
npm install hyperconf
First build a spec, see example.js
Then use it
const Hyperconf = require('hyperconf')
const spec = require('./spec/hyperconf')
// core is the core that contains future versions of the spec
const conf = new Hyperconf(spec, core, { minLength: 0, production: true })
await conf.ready()
console.log(conf.current) // <-- current config, always set
conf.on('update', () => {
console.log('conf updated', conf.current)
})
Apache-2.0