Skip to content

node.js config loader enabling multiple nested configs that extend a root config.

Notifications You must be signed in to change notification settings

sdd/config-layered

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: Files loaded = all.js, dev.js
  • NODE_ENV = test-unit: Files loaded = 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');

About

node.js config loader enabling multiple nested configs that extend a root config.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published