multifile-config
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

multifile-config

Build Status codecov Code Climate dependencies Status devDependencies Status

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.

Package Sidebar

Install

npm i multifile-config

Weekly Downloads

3

Version

1.0.7

License

MIT

Last publish

Collaborators

  • dobrakmato