config-dir
app.js:
var config = require('config-dir')('example')
console.log(config.get())
/home/me/configs/example.ini
[foo]
bar=Hello
/home/me/configs/global.ini
[foo]
baz=World
run:
CONFIG_DIR=/home/me/configs/ node app.js
output:
{"foo":{"bar":"Hello","baz":"World"}}
$ npm install config-dir
MIT