config-layered

2.0.0 • Public • Published

config-layered

This config loader allows multiple nested configs that inherit from a parent. The root config, all.js, is loaded first. Then, for each item in a hyphen-separated NODE_ENV, an extra config is merged in.

E.g:

NODE_ENV = dev: all.js, dev.js NODE_ENV = test-unit: all.js, test.js, test-unit.js

Usage

 
var configLayered = require('config-layered')
 
// default: load config from ./config directory
var config = configLayered();
 
// specified folder: load config fron specific folder
config = configLayered('configuration');
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    1
  • 1.1.0
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i config-layered

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • sc0ttyd