{"name":"config","version":"4.2.1","keywords":["conf","config","configuration","node-config","config-node","env","environment"],"author":{"name":"Loren West","email":"open_source@lorenwest.com"},"license":"MIT","_id":"config@4.2.1","maintainers":[{"name":"markstos","email":"mark@rideamigos.com"},{"name":"lorenwest","email":"npm@lorenwest.com"},{"name":"jdmarshall","email":"jdmarshall@gmail.com"}],"homepage":"http://github.com/node-config/node-config.git","bugs":{"url":"https://github.com/node-config/node-config/issues"},"c8":{"include":["*.js","lib/**/*.js"],"reporter":"lcov","report-dir":"./coverage"},"dist":{"shasum":"1c08db7de45e559a1d95ed97a78891746d892230","tarball":"http://registry-npm.ywwl.com/config/download/config-4.2.1.tgz","fileCount":10,"integrity":"sha512-i6zeN/G0RG0x45Xd0mEYDojE/x/ISSeaFWIbCTVvTI1YctI5nE1ywQlZuTR4O/QEa05yQqVgPLxUthY0UbnpsA==","signatures":[{"sig":"MEUCIQC3sGygD72UcgFjMpJVOhGsuVQh3MIwJfRPBqPAT/EjWQIgJ7cAo7zAwkyy25XrEp772DpRfbtZl8j/1ejZcGxalT8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101747,"size":29786,"noattachment":false,"key":"/config/-/config-4.2.1.tgz"},"main":"./lib/config.js","engines":{"node":">= 20.0.0"},"gitHead":"8791d32faf8b60f1ba6b37598b64e9ebe965624c","scripts":{"test":"NODE_OPTIONS='--no-experimental-strip-types' c8 node --test"},"_npmUser":{"name":"jdmarshall","email":"jdmarshall@gmail.com"},"repository":{"url":"git+ssh://git@github.com/node-config/node-config.git","type":"git"},"_npmVersion":"10.8.2","description":"Configuration control for production node deployments","directories":{"lib":"./lib"},"_nodeVersion":"18.20.8","dependencies":{"json5":"^2.2.3"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.3","cson":"^3.0.1","toml":"^2.0.6","x2js":"^2.0.1","yaml":"^2.8.2","hjson":"^1.2.0","semver":"5.3.0","request":"^2.88.2","ts-node":"^3.3.0","properties":"~1.2.1","typescript":"^2.4.2","underscore":"^1.8.3","@types/node":"^7.0.8","coffeescript":"2.2.4"},"_npmOperationalInternal":{"tmp":"tmp/config_4.2.1_1770758333779_0.17854924302238673","host":"s3://npm-registry-packages-npm-production"},"readme":"Configure your Node.js Applications\n===================================\n\n[![npm package](https://img.shields.io/npm/v/config)](https://www.npmjs.com/package/config)\n[![Downloads](https://img.shields.io/npm/dt/config)](https://www.npmjs.com/package/config)\n[![Issues](https://img.shields.io/github/issues/node-config/node-config)](https://github.com/node-config/node-config/issues)\n\n[Release Notes](https://github.com/node-config/node-config/releases)\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\nTypeScript\n----------\n\nType declarations are published under `types/` and resolved via `typesVersions`. Subpath typings are included for `config/parser`, 'config/util/defer', and `config/lib/util` in addition to the main `config` entrypoint.\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/1656505?v=4><a href=\"https://github.com/jdmarshall\">jdmarshall</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\">i&shy;Moses</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/11448209?v=4><a href=\"https://github.com/mdkitzman\">mdkitzman</a></td>\n</tr><tr><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\">leachi&shy;M2k</a></td>\n<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</tr><tr><td><img src=https://avatars.githubusercontent.com/u/8650543?v=4><a href=\"https://github.com/leonardovillela\">leonardovillela</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/77355440?v=4><a href=\"https://github.com/jeremy-daley-kr\">jeremy-daley-kr</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/5138570?v=4><a href=\"https://github.com/BadgerBadgerBadgerBadger\">Badger&shy;Badger&shy;Badger&shy;Badger</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/1751645?v=4><a href=\"https://github.com/cunneen\">cunneen</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/138707?v=4><a href=\"https://github.com/th507\">th507</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/242058858?v=4><a href=\"https://github.com/tiny-rac00n\">tiny-rac00n</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/1872824?v=4><a href=\"https://github.com/fgheorghe\">fgheorghe</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/498929?v=4><a href=\"https://github.com/roncli\">roncli</a></td>\n</tr><tr><td><img src=https://avatars.githubusercontent.com/u/1355559?v=4><a href=\"https://github.com/superoven\">superoven</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/631249?v=4><a href=\"https://github.com/airdrummingfool\">airdrummingfool</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/54934?v=4><a href=\"https://github.com/wmertens\">wmertens</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/2842176?v=4><a href=\"https://github.com/XadillaX\">Xadilla&shy;X</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/107884?v=4><a href=\"https://github.com/inside\">inside</a></td>\n<td><img src=https://avatars.githubusercontent.com/u/1320090?v=4><a href=\"https://github.com/dsbert\">dsbert</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-2026 Loren West \n[and other contributors](https://github.com/node-config/node-config/graphs/contributors)\n","publish_time":1770758333911,"_cnpm_publish_time":1770758333911,"dist-tags":{"latest":"5.0.1","lts":"4.4.2","preview":"5.0.0-alpha.2"}}