Skip to content
Snippets Groups Projects
Commit 0b284209 authored by Sigmund, Dominik's avatar Sigmund, Dominik
Browse files

Examples done

parent 31744a69
No related branches found
No related tags found
1 merge request!1Master
......@@ -28,6 +28,28 @@ It reads from the following sources, performing a deep merge:
- 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
......
{
"setting":"value",
"another": {
"setting":"avalue"
}
}
\ No newline at end of file
{
"setting":"overwritten",
"another": {
"more":"settings"
}
}
\ No newline at end of file
let config = require('../../index')
console.log(JSON.stringify(config, undefined, 2))
\ No newline at end of file
{
"setting":"value",
"another": {
"setting":"avalue"
}
}
\ No newline at end of file
let config = require('../../index')
console.log(JSON.stringify(config, undefined, 2))
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment