Package Exports
- config
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-config
Configuration control for production node deployments
Introduction
Node-config is a configuration system for Node.js application server deployments. It lets you define a default set of application parameters, and tune them for different runtime environments (development, qa, staging, production, etc.).
Parameters defined by node-config can be monitored and tuned at runtime without bouncing your production servers.
Online documentation is available at http://lorenwest.github.com/node-config/latest
Quick Start
In your project directory, install and verify using npm:
my-project$ npm install config
my-project$ npm test configEdit the default configuration file (.js, .json, or .yaml):
my-project$ mkdir config
my-project$ vi config/default.yaml
(example default.yaml file):
Customer:
dbHost: localhost
dbPort: 5984
dbName: customersEdit the production configuration file:
my-project$ vi config/production.yaml
(example production.yaml file):
Customer:
dbHost: prod-db-serverUse the configuration in your code:
var CONFIG = require('config').Customer;
...
db.connect(CONFIG.dbHost, CONFIG.dbPort, CONFIG.dbName);Start your application server:
my-project$ export NODE_ENV=production
my-project$ node app.jsRunning in this configuration, CONFIG.dbPort and CONFIG.dbName
will come from the default.yaml file, and CONFIG.dbHost will
come from the production.yaml file.
See Also
config - Online documentation
monitor - Remote monitoring for Node.js applications
License
May be freely distributed under the MIT license
See LICENSE file.
Copyright (c) 2010-2014 Loren West and other contributors


