multifile-config
v1.0.7
Published
Split configuration to multiple files.
Downloads
6
Maintainers
Readme
multifile-config
Installation
$ npm install multifile-config --save
What does it do
Reads multiple javascript files from specified config directory and merges their exports into one object.
You can require all your configuration with one-liner:
import loadConfig from 'multifile-config';
var config = loadConfig(path.join(__dirname, 'config'));
While having your configuration split to multiple files for different parts of you application (http, templating engine, etc...) to avoid one long unreadable 900-lines long configuration file:
src/
config/
http.js
json.js
templating.js
redis.js
mysql.js
controllers/
...
views/
...
app.js
It's simple, small and has zero dependencies.