@logicalroute/configloader
v1.0.2
Published
ConfigLoader Module - load config from files, consul k/v url, or environment variables.
Downloads
3
Readme
ConfigLoader NPM Module
ConfigLoader gives a way to acquire config from external sources and also includes a local defaults so you can work on an exception/override basis for some variables.
Currently --config=?
on the command line will get parsed and depending on either being a file or a
URL will be aquired and merged on top of the defaults file. Other command line arguments will then be
added on top so can potentially overwrite.
You can specify multiple --config
which will be processed in order specified, with each being layered on top.
So, order of precedence is:
defaults < config file/url 1 < config file/url n < args
Note: At present if a URL is specified it is assumed to be a key/value URL from a Consul server rather than a direct JSON request.