Select Git revision
-
Sigmund, Dominik authoredSigmund, Dominik authored
README.md 2.37 KiB
config
Simple Config Log with HashiCorp Vault support.
Installation
npm install --save git+https://it-devops-01.br-edv.brnet.int/general/config.git
Usage
const Config = require('config')
let config = new Config()
Then config is your config object. (Use it like config.setting)
It reads from the following sources, performing a deep merge:
(The Top Value overwrites the lower ones)
- ENV
- config.json
- config.defaults.json
Examples
Only config.defaults.json
node examples/only-defaults/index.js
Only config.json
(Kind of legacy use)
node examples/only-local/index.js
defaults and config.json
node examples/defaults-overwrite/index.js
enviroment variables
(Enviroment set by command to not pollute your machine)
setting=overwritten-by-env node examples/env/index.js
TODO / Missing
- hashicorp values support: if value == "vault:", treat it as secret