{"name":"config","version":"0.4.26","author":{"name":"Loren West","email":"open_source@lorenwest.com"},"_id":"config@0.4.26","homepage":"http://lorenwest.github.com/node-config/","dist":{"shasum":"362da6ef909882529055ef64b18e5b3a57d588a6","tarball":"http://registry-npm.ywwl.com/config/download/config-0.4.26.tgz","integrity":"sha512-rM6KE7uHCGLKejZCg2HLmd+CuajkpTa32J8ND5RHiZLLodphTeQwnuZamH3ft1obFeWGRPN8L3Y+K21bCZs7dg==","signatures":[{"sig":"MEUCIDaekkrWY49scGDbtEO9e0hSPsjf+sr94OWXl72YP9PHAiEApLSNO+/d4hlh2uDNTRBrzsuLHj3Y0kxQdiREI47Pk+4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":132056,"noattachment":false,"key":"/config/-/config-0.4.26.tgz"},"main":"./lib/config.js","engines":{"node":">0.4.x"},"scripts":{"test":"./node_modules/vows/bin/vows test/*.js --spec"},"_npmUser":{"name":"lorenwest","email":"npm@lorenwest.com"},"licenses":["MIT"],"_npmVersion":"1.1.69","description":"Configuration control for production node deployments","directories":{"lib":"./lib","test":"./test","config":"./config"},"dependencies":{},"devDependencies":{"vows":">=0.5.13","js-yaml":"0.3.x","coffee-script":">=1.2.0"},"readme":"Configure your Node.js Applications\n===================================\n\n[![NPM](https://nodei.co/npm/config.svg?downloads=true&downloadRank=true)](https://nodei.co/npm/config/)&nbsp;&nbsp;\n[![Build Status](https://secure.travis-ci.org/node-config/node-config.svg?branch=master)](https://travis-ci.org/lorenwest/node-config)&nbsp;&nbsp;\n[release notes](https://github.com/node-config/node-config/blob/master/History.md)\n\nIntroduction\n------------\n\nNode-config organizes hierarchical configurations for your app deployments.\n\nIt lets you define a set of default parameters,\nand extend them for different deployment environments (development, qa,\nstaging, production, etc.).\n\nConfigurations are stored in [configuration files](https://github.com/node-config/node-config/wiki/Configuration-Files) within your application, and can be overridden and extended by [environment variables](https://github.com/lorenwest/node-config/wiki/Environment-Variables),\n [command line parameters](https://github.com/node-config/node-config/wiki/Command-Line-Overrides), or [external sources](https://github.com/lorenwest/node-config/wiki/Configuring-from-an-External-Source).\n\nThis gives your application a consistent configuration interface shared among a\n[growing list of npm modules](https://www.npmjs.org/browse/depended/config) also using node-config.\n\nProject Guidelines\n------------------\n\n* *Simple* - Get started fast\n* *Powerful* - For multi-node enterprise deployment\n* *Flexible* - Supporting multiple config file formats\n* *Lightweight* - Small file and memory footprint\n* *Predictable* - Well tested foundation for module and app developers\n\nQuick Start\n---------------\nThe following examples are in JSON format, but configurations can be in other [file formats](https://github.com/node-config/node-config/wiki/Configuration-Files#file-formats).\n\n**Install in your app directory, and edit the default config file.**\n\n```shell\n$ npm install config\n$ mkdir config\n$ vi config/default.json\n```\n```js\n{\n  // Customer module configs\n  \"Customer\": {\n    \"dbConfig\": {\n      \"host\": \"localhost\",\n      \"port\": 5984,\n      \"dbName\": \"customers\"\n    },\n    \"credit\": {\n      \"initialLimit\": 100,\n      // Set low for development\n      \"initialDays\": 1\n    }\n  }\n}\n```\n\n**Edit config overrides for production deployment:**\n\n```shell\n $ vi config/production.json\n```\n\n```json\n{\n  \"Customer\": {\n    \"dbConfig\": {\n      \"host\": \"prod-db-server\"\n    },\n    \"credit\": {\n      \"initialDays\": 30\n    }\n  }\n}\n```\n\n**Use configs in your code:**\n\n```js\nconst config = require('config');\n//...\nconst dbConfig = config.get('Customer.dbConfig');\ndb.connect(dbConfig, ...);\n\nif (config.has('optionalFeature.detail')) {\n  const detail = config.get('optionalFeature.detail');\n  //...\n}\n```\n\n`config.get()` will throw an exception for undefined keys to help catch typos and missing values.\nUse `config.has()` to test if a configuration value is defined.\n\n**Start your app server:**\n\n```shell\n$ export NODE_ENV=production\n$ node my-app.js\n```\n\nRunning in this configuration, the `port` and `dbName` elements of `dbConfig`\nwill come from the `default.json` file, and the `host` element will\ncome from the `production.json` override file.\n\nArticles\n--------\n\n* [Configuration Files](https://github.com/node-config/node-config/wiki/Configuration-Files)\n  * [Special features for JavaScript configuration files](https://github.com/node-config/node-config/wiki/Special-features-for-JavaScript-configuration-files)\n* [Common Usage](https://github.com/node-config/node-config/wiki/Common-Usage)\n* [Environment Variables](https://github.com/node-config/node-config/wiki/Environment-Variables)\n* [Reserved Words](https://github.com/node-config/node-config/wiki/Reserved-Words)\n* [Command Line Overrides](https://github.com/node-config/node-config/wiki/Command-Line-Overrides)\n* [Multiple Node Instances](https://github.com/node-config/node-config/wiki/Multiple-Node-Instances)\n* [Sub-Module Configuration](https://github.com/node-config/node-config/wiki/Sub-Module-Configuration)\n* [Configuring from a DB / External Source](https://github.com/node-config/node-config/wiki/Configuring-from-an-External-Source)\n* [Securing Production Config Files](https://github.com/node-config/node-config/wiki/Securing-Production-Config-Files)\n* [External Configuration Management Tools](https://github.com/node-config/node-config/wiki/External-Configuration-Management-Tools)\n* [Examining Configuration Sources](https://github.com/node-config/node-config/wiki/Examining-Configuration-Sources)\n* [Using Config Utilities](https://github.com/node-config/node-config/wiki/Using-Config-Utilities)\n* [Upgrading from Config 0.x](https://github.com/node-config/node-config/wiki/Upgrading-From-Config-0.x)\n* [Webpack usage](https://github.com/node-config/node-config/wiki/Webpack-Usage)\n\nFurther Information\n---------------------\nIf you still don't see what you are looking for, here are some more resources to check: \n\n * The [wiki may have more pages](https://github.com/node-config/node-config/wiki) which are not directly linked from here.\n * Review [questions tagged with node-config](https://stackexchange.com/filters/207096/node-config) on StackExchange. These are monitored by `node-config` contributors.\n * [Search the issue tracker](https://github.com/node-config/node-config/issues). Hundreds of issues have already been discussed and resolved there.\n\nContributors\n------------\n<table id=\"contributors\"><tr><td><img src=https://avatars.githubusercontent.com/u/373538?v=4><a href=\"https://github.com/lorenwest\">lorenwest</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/25829?v=4><a href=\"https://github.com/markstos\">markstos</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/1083065?v=4><a href=\"https://github.com/iMoses\">iMoses</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/447151?v=4><a href=\"https://github.com/elliotttf\">elliotttf</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/8839447?v=4><a href=\"https://github.com/jfelege\">jfelege</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/66902?v=4><a href=\"https://github.com/leachiM2k\">leachiM2k</a></td>\n</tr><tr><td><img src=https://avatars.githubusercontent.com/u/791137?v=4><a href=\"https://github.com/josx\">josx</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/133277?v=4><a href=\"https://github.com/enyo\">enyo</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/4307697?v=4><a href=\"https://github.com/leosuncin\">leosuncin</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/1077378?v=4><a href=\"https://github.com/arthanzel\">arthanzel</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/1656140?v=4><a href=\"https://github.com/eheikes\">eheikes</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/138707?v=4><a href=\"https://github.com/th507\">th507</a></td>\n</tr><tr><td><img src=https://avatars.githubusercontent.com/u/506460?v=4><a href=\"https://github.com/Osterjour\">Osterjour</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/1751645?v=4><a href=\"https://github.com/cunneen\">cunneen</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/842998?v=4><a href=\"https://github.com/nsabovic\">nsabovic</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/5138570?v=4><a href=\"https://github.com/BadgerBadgerBadgerBadger\">BadgerBadgerBadgerBadger</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/2529835?v=4><a href=\"https://github.com/simon-scherzinger\">simon-scherzinger</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/8650543?v=4><a href=\"https://github.com/leonardovillela\">leonardovillela</a></td>\n</tr><tr><td><img src=https://avatars.githubusercontent.com/u/175627?v=4><a href=\"https://github.com/axelhzf\">axelhzf</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/7782055?v=4><a href=\"https://github.com/benkroeger\">benkroeger</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/1872824?v=4><a href=\"https://github.com/fgheorghe\">fgheorghe</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/1443067?v=4><a href=\"https://github.com/IvanVergiliev\">IvanVergiliev</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/1736957?v=4><a href=\"https://github.com/jpwilliams\">jpwilliams</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/1246875?v=4><a href=\"https://github.com/jaylynch\">jaylynch</a></td>\n</tr><tr><td><img src=https://avatars.githubusercontent.com/u/145742?v=4><a href=\"https://github.com/jberrisch\">jberrisch</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/9355665?v=4><a href=\"https://github.com/kgoerlitz\">kgoerlitz</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/8525267?v=4><a href=\"https://github.com/bertho-zero\">bertho-zero</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/6686044?v=4><a href=\"https://github.com/NguyenMatthieu\">NguyenMatthieu</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/1918551?v=4><a href=\"https://github.com/nitzan-shaked\">nitzan-shaked</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/3058150?v=4><a href=\"https://github.com/robertrossmann\">robertrossmann</a></td>\n</tr></table>\n\nLicense\n-------\n\nMay be freely distributed under the [MIT license](https://raw.githubusercontent.com/node-config/node-config/master/LICENSE).\n\nCopyright (c) 2010-2022 Loren West \n[and other contributors](https://github.com/node-config/node-config/graphs/contributors)\n\n","publish_time":1370911345192,"maintainers":[{"name":"markstos","email":"mark@rideamigos.com"},{"name":"lorenwest","email":"npm@lorenwest.com"}],"_cnpm_publish_time":1370911345192,"dist-tags":{"latest":"5.0.1","lts":"4.4.2","preview":"5.0.0-alpha.2"}}