colophon
v1.0.1
Published
Configuration helper
Downloads
27
Readme
Colophon
Colophon is a configuration helper with sane defaults.
File structure
Set your configuration data into this structure:
config
default.json
development.json
test.json
production.json
Override default configuration from default.json
in <env>.json
.
Usage
Ensure configuration uses CAPS for setting names.
Given this configuration file:
{
"SETTING": 123
, "NESTED": {
"SETTING": 123
}
}
To retrieve configuration settings:
var c = require('colophon');
var setting = c('setting');
// setting === 123
var nested = c('nested:setting');
// nested === 123