# config [](https://it-devops-01.br-edv.brnet.int/general/config/commits/master) [](https://it-devops-01.br-edv.brnet.int/general/config/commits/master) [](https://it-devops-01.br-edv.brnet.int:8999/dashboard?id=config) [](https://it-devops-01.br-edv.brnet.int:8999/dashboard?id=config) [](https://it-devops-01.br-edv.brnet.int:8999/dashboard?id=config) [](https://it-devops-01.br-edv.brnet.int:8999/dashboard?id=config) [](https://it-devops-01.br-edv.brnet.int:8999/dashboard?id=config) [](https://it-devops-01.br-edv.brnet.int:8999/dashboard?id=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