Permalink
Browse files

Merge branch 'v0.4.16' of github.com:lorenwest/node-config into v0.4.17

  • Loading branch information...
2 parents 2319b46 + 6fc7edf commit 86507dfa151b3a9d9840ee69335e3da5e83edd60 Loren West committed Sep 26, 2012
Showing with 10 additions and 5 deletions.
  1. +3 −1 doc/template/overview.tmpl
  2. +3 −2 lib/config.js
  3. +4 −2 package.json
@@ -60,7 +60,9 @@
</p>
<p>
The runtime.json file contains configuration changes made at runtime either
- manually, or by the application setting a configuration value. Node-config
+ manually, or by the application setting a configuration value. The location is
+ specified by <i>NODE_CONFIG_RUNTIME_JSON</i> environment variable. By default, it
+ is a file called runtime.json in <i>NODE_CONFIG_DIR</i> directory. Node-config
monitors this file and loads any new configurations it detects.
</p>
<p>
View
@@ -9,8 +9,9 @@ var Yaml = null, // External libraries are lazy-loaded
var DEFAULT_CLONE_DEPTH = 6,
FILE_WATCHER_INTERVAL = 2500, // For old style (pre-6.0) file watching
DIR = 'NODE_CONFIG_DIR',
- CONFIG_DIR = process.env[DIR] ? process.env[DIR] : process.cwd() + '/config',
- runtimeJsonFilename = CONFIG_DIR + '/runtime.json',
+ CONFIG_DIR = process.env[DIR] || process.cwd() + '/config',
+ RUNTIME = 'NODE_CONFIG_RUNTIME_JSON',
+ runtimeJsonFilename = process.env[RUNTIME] || CONFIG_DIR + '/runtime.json',
originalConfig = null, // Not including the runtime.json values
runtimeJson = {}, // Current runtimeJson extensions
runtimeJsonWatcher = null, // Filesystem watcher for runtime.json
View
@@ -7,11 +7,13 @@
"homepage": "http://lorenwest.github.com/node-config/",
"directories": {"lib": "./lib", "config": "./config", "test": "./test"},
"dependencies": {
+ },
+ "optionalDependencies": {
"js-yaml" : "0.3.x",
"coffee-script" : ">=1.2.0",
- "vows" : ">=0.5.13"
- },
+ }
"devDependencies": {
+ "vows" : ">=0.5.13"
},
"engines": {"node": ">0.4.x"},
"scripts": {

0 comments on commit 86507df

Please sign in to comment.