1.0.3 • Published 8 years ago

extending-config v1.0.3

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
8 years ago

extending-config

Configuration through demanding common config and updating it with environment-dependent part

Installation

npm i extending-config --save

Usage

Require configurator like this: var configurator = require("extending-config");

And get config then using configurator. It accepts options like this:

basePath path to your config directory. Defaults to your cwd / 'config'

environment your current environment defaults to your NODE_ENV or 'development'

common base part of your config, defaults to 'common'. Use false if you dont want to have common part of config.

Common config would be updated by environment config. Then get config like this:

var config = configurator();

Be careful not to use one config as base for two different environments in the same process run. They are not copied and my be mixed!

Tests

To test run: npm test

You also can look usage of module in tests/test.js.

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago