env-conf-loader
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "env-conf-loader", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "auto load config file/directory with env", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,2 +12,4 @@ # evn-conf-loader | ||
load configs from file/directory with current, merge object by object's key and environment variable. | ||
## Install | ||
@@ -39,7 +41,7 @@ | ||
var conf = loader('./foo.json') | ||
// if NODE_ENV is nothing | ||
// NODE_ENV is undefined | ||
console.log(conf.bar) // 1 | ||
// if NODE_ENV is production | ||
// NODE_ENV is production | ||
console.log(conf.bar) // 2 | ||
// if NODE_ENV is development | ||
// NODE_ENV is development | ||
console.log(conf.bar) // 3 | ||
@@ -46,0 +48,0 @@ ``` |
5877
9
82