Skip to content
Snippets Groups Projects
Select Git revision
  • 3-rewrite-in-typescript
  • main default protected
  • 1.13.6
  • 1.13.5
  • 1.13.4
  • 1.13.3
  • 1.13.2
  • 1.13.1
  • 1.13.0
  • 1.12.4
  • 1.12.3
  • 1.12.2
  • 1.12.1
  • 1.12.0
  • 1.11.0
  • 1.10.1
  • 1.10.0
  • 1.9.0
  • v1.7.0
  • 1.8.0
  • v1.7.1
  • v1.6.2
22 results

README.md

Blame
  • config

    pipeline status coverage report Quality Gate Status Maintainability Rating Reliability Rating Security Rating Technical Debt Vulnerabilities

    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