2.1.0 • Published 3 years ago

configure-merge v2.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

A more friendly way to use config file when you have many env,let the env config to merge default config

npm i configure-merge --save

demo

config/app.json

{
  "hello":"app in default"
}

config/env/app.json

{
  "hello":"app in test"
}

app.js

var configure = require('configure-merge');

console.log(configure.get('app'));

NODE_ENV=test node app.js

output

{
  "hello":"app in test"
}

support .js, .json, .node, .yaml, .yml

default NODE_ENV is dev

2.1.0

3 years ago

2.0.0

3 years ago

1.2.0

3 years ago