1.0.0-alpha.1 • Published 7 years ago
confit-merger v1.0.0-alpha.1
confit-merger
A utility module to merge environment-aware confit based configurations.
Please read these documents on confit:
Usage
const ConfitMerger = require('confit-merger');
ConfitMerger( {
paths: [
Path.resolve('path/to/default/config'),
Path.resolve('path/to/module/config'),
Path.resolve('path/to/app/config')
]
}).then(config => {
// `config` is the Merged confit object.
console.log(config.get('a'));
});
API
ConfitMerger(options)
options
- (Object) - (required) - Options for confit mergerpaths
- (*Array) - (required) - The list of absolute paths of thebasedir
of the config files (basedir
is the directory in which confg files can be located).protocols
- (*Object) - (optional) - An object containing the details of shortstop protocols to be added in addition to the default shortstop-handlers.
Example
1.0.0-alpha.2
7 years ago
1.0.0-alpha.1
7 years ago