1.0.1 • Published 10 years ago
colophon v1.0.1
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.jsonOverride 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