Skip to content

subeeshcbabu-zz/confit-merger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 merger

    • paths - (*Array) - (required) - The list of absolute paths of the basedir 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

About

A utility module to merge environment-aware confit based configurations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published