{"_id":"12factor-config","_rev":"19-36bf923aa2cb3c4b06dedab6a62dc609","name":"12factor-config","description":"Read the config for your app from only the environment.","dist-tags":{"latest":"2.0.0"},"versions":{"0.1.0":{"name":"12factor-config","description":"Read the config for your app from only the environment.","version":"0.1.0","homepage":"https://github.com/chilts/12factor-config","dependencies":{},"devDependencies":{"tape":"~2.3.2"},"repository":{"type":"git","url":"git://github.com/chilts/12factor-config.git"},"bugs":{"url":"http://github.com/chilts/12factor-config/issues"},"licenses":[{"type":"MIT","url":"http://chilts.mit-license.org/2013/"}],"keywords":["config","env","environment","12factor"],"scripts":{"test":"for FILE in test/*.js; do echo $FILE; node $FILE; done"},"_id":"12factor-config@0.1.0","dist":{"shasum":"108dc76e311b1f19e901718655a17eb5676b542e","tarball":"https://registry.npmjs.org/12factor-config/-/12factor-config-0.1.0.tgz","integrity":"sha512-XmFvAsy4GhkRXP6oXULNvqQTCShaaT7V3TFXeQeiRUQB3/3fPf8Whk6rmu5zdnOwsoh+fD+IDvLVV87OgAL+qA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdJ/sYzOFkwyRKglp7LMDmDAL25RhGv/0r+HRsT6XvEwIgYk84cM7Cxtl0AM+rhWzqsKr0MXrFnN8oC9twMwx9AxM="}]},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"chilts","email":"andychilton@gmail.com"},"maintainers":[{"name":"chilts","email":"andychilton@gmail.com"}]},"1.0.0":{"name":"12factor-config","description":"Read the config for your app from only the environment.","version":"1.0.0","homepage":"https://github.com/chilts/12factor-config","dependencies":{},"devDependencies":{"tape":"~2.3.2"},"repository":{"type":"git","url":"git://github.com/chilts/12factor-config.git"},"bugs":{"url":"http://github.com/chilts/12factor-config/issues"},"licenses":[{"type":"MIT","url":"http://chilts.mit-license.org/2013/"}],"keywords":["config","env","environment","12factor"],"scripts":{"test":"for FILE in test/*.js; do echo $FILE; node $FILE; done"},"author":{"name":"Andrew Chilton"},"license":"MIT","gitHead":"4ee8f8ddbd4eb3682c25300adfcf6191531d8d25","_id":"12factor-config@1.0.0","_shasum":"53484eccec603e774b277f43f589245da935fc81","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"chilts","email":"andychilton@gmail.com"},"maintainers":[{"name":"chilts","email":"andychilton@gmail.com"}],"dist":{"shasum":"53484eccec603e774b277f43f589245da935fc81","tarball":"https://registry.npmjs.org/12factor-config/-/12factor-config-1.0.0.tgz","integrity":"sha512-E/KlL4GrmDO/W42YI7S6gCcOoJW7pxGQ27RGJs/QI8NyE6Oc89Ev1NK7/f/t7yxB7lkA8N/TvYuDVsN4pMQw3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGcUx6gwb1SWtUZs7cfjD2FNmtYKSyQVAjTRMaz6ysX/AiEAoLDzZdLOdTbHtxMZT4mxS8Sj5fylQlwNECj/n53tDJg="}]}},"1.0.1":{"name":"12factor-config","description":"Read the config for your app from only the environment.","version":"1.0.1","homepage":"https://github.com/chilts/12factor-config","dependencies":{},"devDependencies":{"tape":"~2.3.2"},"repository":{"type":"git","url":"git://github.com/chilts/12factor-config.git"},"bugs":{"url":"http://github.com/chilts/12factor-config/issues"},"license":"MIT","keywords":["config","env","environment","12factor"],"scripts":{"test":"for FILE in test/*.js; do echo $FILE; node $FILE; done"},"author":{"name":"Andrew Chilton"},"gitHead":"41f1a7800ca25fdea1b7826f1ed89eeb3d9867a0","_id":"12factor-config@1.0.1","_shasum":"fab0480e439ac75fe276642836e3b8e61d5ac4db","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.10.38","_npmUser":{"name":"chilts","email":"andychilton@gmail.com"},"maintainers":[{"name":"chilts","email":"andychilton@gmail.com"}],"dist":{"shasum":"fab0480e439ac75fe276642836e3b8e61d5ac4db","tarball":"https://registry.npmjs.org/12factor-config/-/12factor-config-1.0.1.tgz","integrity":"sha512-zoDHn9xiWzx/uBQl9i014DahUkNiLzR9y2+wk93729IEfAAumKWVjFAFGiYLTENJNl6Zm7cwlHQHsH2OFD2wYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr0dYgFqCDu8EN1V350QCq9nELgqo9F2tsUmKG7UqyPwIhAKHTzEVBL769ueIeArFQ81Hjz5g/pef9qPwBgmpvM9H5"}]}},"1.1.0":{"name":"12factor-config","description":"Read the config for your app from only the environment.","version":"1.1.0","homepage":"https://github.com/chilts/12factor-config","dependencies":{},"devDependencies":{"tape":"~4.2.2"},"repository":{"type":"git","url":"git://github.com/chilts/12factor-config.git"},"bugs":{"url":"http://github.com/chilts/12factor-config/issues"},"license":"MIT","keywords":["config","env","environment","12factor"],"scripts":{"test":"for FILE in test/*.js; do echo $FILE; node $FILE; done"},"author":{"name":"Andrew Chilton"},"gitHead":"d22d0cb89ec34a6dac455e79b121092191c9caaf","_id":"12factor-config@1.1.0","_shasum":"c0aa255b97f21585f466800f9ce155bc9f9e9381","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"chilts","email":"andychilton@gmail.com"},"dist":{"shasum":"c0aa255b97f21585f466800f9ce155bc9f9e9381","tarball":"https://registry.npmjs.org/12factor-config/-/12factor-config-1.1.0.tgz","integrity":"sha512-t74GshO4qJQ7V/KN+OVdNbotl/jgMMLEkSrB+9Slj1Y2DdSKY4zsfepFrFo8Ckj/jCbds7+AIgWsWfnZA/sdCA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDLweE1lsjQiq2Zin6Z+N1lSsA3pNoatQ64G8dlQguuBAiALxONefcHiMC1BttOQqIDvZSJRy3mnvNK2SbkYK46z8w=="}]},"maintainers":[{"name":"chilts","email":"andychilton@gmail.com"}]},"1.2.0":{"name":"12factor-config","description":"Read the config for your app from only the environment.","version":"1.2.0","homepage":"https://github.com/chilts/12factor-config","scripts":{"test":"for FILE in test/*.js; do echo $FILE; node $FILE; done"},"dependencies":{},"devDependencies":{"tape":"^4.6.0"},"repository":{"type":"git","url":"git://github.com/chilts/12factor-config.git"},"bugs":{"url":"http://github.com/chilts/12factor-config/issues"},"author":{"name":"Andrew Chilton","email":"andychilton@gmail.com","url":"http://www.chilts.org/"},"contributors":[{"name":"Stuart Clark","email":"stuart.clark@Jahingo.com","url":"https://github.com/stuart-c"}],"licenses":[{"type":"MIT","url":"http://chilts.mit-license.org/2014/"}],"keywords":["config","env","environment","12factor"],"gitHead":"feba7f489c148b58dbc4855cc4343e2c1f949e81","_id":"12factor-config@1.2.0","_shasum":"864a4641d51cf4d818640a412e3ef2571841071d","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"chilts","email":"andychilton@gmail.com"},"dist":{"shasum":"864a4641d51cf4d818640a412e3ef2571841071d","tarball":"https://registry.npmjs.org/12factor-config/-/12factor-config-1.2.0.tgz","integrity":"sha512-l0zPv1/eWmmdYe28BCPoHzCf8Zsgx5ntGEKcMcvoO2bVPp0et0/LN0GpKhMOAQM3v9R9e2RtuA/RxFni+CfK1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICAQZUHc5lG1+uHl6z9l8hFjnLlIxnXa3WlAjAKilGj4AiEA0cn+jjT/embbR4CKYBd477WsRr3paKnYZwNapWSVnKo="}]},"maintainers":[{"name":"chilts","email":"andychilton@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/12factor-config-1.2.0.tgz_1468877815365_0.9898249404504895"}},"1.2.1":{"name":"12factor-config","description":"Read the config for your app from only the environment.","version":"1.2.1","homepage":"https://github.com/chilts/12factor-config","scripts":{"test":"for FILE in test/*.js; do echo $FILE; node $FILE; done"},"dependencies":{},"devDependencies":{"tape":"^4.6.0"},"repository":{"type":"git","url":"git://github.com/chilts/12factor-config.git"},"bugs":{"url":"http://github.com/chilts/12factor-config/issues"},"author":{"name":"Andrew Chilton","email":"andychilton@gmail.com","url":"http://www.chilts.org/"},"contributors":[{"name":"Stuart Clark","email":"stuart.clark@Jahingo.com","url":"https://github.com/stuart-c"}],"licenses":[{"type":"MIT","url":"http://chilts.mit-license.org/2014/"}],"keywords":["config","env","environment","12factor"],"gitHead":"6820fcbb690b6daaacb0a5183cdb15dee4208cc5","_id":"12factor-config@1.2.1","_shasum":"96e6329d7bbb22b5863f074894a272e5fd0f6d30","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"chilts","email":"andychilton@gmail.com"},"dist":{"shasum":"96e6329d7bbb22b5863f074894a272e5fd0f6d30","tarball":"https://registry.npmjs.org/12factor-config/-/12factor-config-1.2.1.tgz","integrity":"sha512-D9vnoj9zBv4Bj8CP4bTGB2Xulk1klU1aBhCkIr7t8Cm24iy8h3WWPJ5b4WVtYdHQbGBxK9jsZ3V8/mXzIMsLRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHqpg46nOVtxc0y+lLlRsVA9EUFXfHA7FAfiMLsw+PsHAiB7eDuDy6/Eww/X/C+rtHNlqHv0umJ45B/lcidoqKgUQQ=="}]},"maintainers":[{"name":"chilts","email":"andychilton@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/12factor-config-1.2.1.tgz_1468878210715_0.5410305729601532"}},"1.3.0":{"name":"12factor-config","description":"Read the config for your app from only the environment.","version":"1.3.0","homepage":"https://github.com/chilts/12factor-config","scripts":{"test":"for FILE in test/*.js; do echo $FILE; node $FILE; done"},"dependencies":{},"devDependencies":{"tape":"^4.6.0"},"repository":{"type":"git","url":"git://github.com/chilts/12factor-config.git"},"bugs":{"url":"http://github.com/chilts/12factor-config/issues"},"author":{"name":"Andrew Chilton","email":"andychilton@gmail.com","url":"http://www.chilts.org/"},"contributors":[{"name":"Stuart Clark","email":"stuart.clark@Jahingo.com","url":"https://github.com/stuart-c"}],"licenses":[{"type":"MIT","url":"http://chilts.mit-license.org/2014/"}],"keywords":["config","env","environment","12factor"],"gitHead":"3263a98b08954dec4a85430493a11466dda9c784","_id":"12factor-config@1.3.0","_shasum":"4426896d8e16e3762f793089350c43ab74d09fbc","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"chilts","email":"andychilton@gmail.com"},"dist":{"shasum":"4426896d8e16e3762f793089350c43ab74d09fbc","tarball":"https://registry.npmjs.org/12factor-config/-/12factor-config-1.3.0.tgz","integrity":"sha512-e5cSi/8gWy/RMxDt4Lu+Lg5kfsr0NzpCam+abohjIkQIdoxWvaRQLUrA68aGPNTbpYjcb6B8UaeJnU5lnJBf9g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJEnZO/wNs/GfaJS+Y13FqQW2sJADQd7DcHnzWZIuw4QIhAJ6qO4ZuvNAzhYb+hOH5+aEp5TVd9Mg/kxR9z73zktO8"}]},"maintainers":[{"name":"chilts","email":"andychilton@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/12factor-config-1.3.0.tgz_1475836080452_0.6348669328726828"}},"1.3.1":{"name":"12factor-config","description":"Read the config for your app from only the environment.","version":"1.3.1","homepage":"https://github.com/chilts/12factor-config","scripts":{"test":"for FILE in test/*.js; do echo $FILE; node $FILE; done"},"dependencies":{},"devDependencies":{"tape":"^4.6.0"},"repository":{"type":"git","url":"git://github.com/chilts/12factor-config.git"},"bugs":{"url":"http://github.com/chilts/12factor-config/issues"},"author":{"name":"Andrew Chilton","email":"andychilton@gmail.com","url":"http://www.chilts.org/"},"contributors":[{"name":"Stuart Clark","email":"stuart.clark@Jahingo.com","url":"https://github.com/stuart-c"}],"licenses":[{"type":"MIT","url":"http://chilts.mit-license.org/2014/"}],"keywords":["config","env","environment","12factor"],"gitHead":"e46d0c1a47472b465d6f67433bc8a3a2b96ba609","_id":"12factor-config@1.3.1","_shasum":"21281f0374927d457492ba8f897432fa36e1e6aa","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"chilts","email":"andychilton@gmail.com"},"dist":{"shasum":"21281f0374927d457492ba8f897432fa36e1e6aa","tarball":"https://registry.npmjs.org/12factor-config/-/12factor-config-1.3.1.tgz","integrity":"sha512-18ZHj4FcI0a7OTlaWU8JCCrUcdk1sF81A0ulhMMNp5PBcdu5fdpxbL3oKlBNGUSmlQA6TsXgb3XLdB3C+qYjHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC6wfATQSBv/RgxNYCuNA2qQgOG00t8qoVRq6E9UoEBRAiBLcBB2IrkSNv+895Nq3ADTjzrEJsq5qcWugeWTt4sEhQ=="}]},"maintainers":[{"name":"chilts","email":"andychilton@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/12factor-config-1.3.1.tgz_1477002480194_0.009616670431569219"}},"2.0.0":{"name":"12factor-config","description":"Read the config for your app from only the environment.","version":"2.0.0","homepage":"https://github.com/chilts/12factor-config","scripts":{"test":"for FILE in test/*.js; do echo $FILE; node $FILE; done"},"dependencies":{},"devDependencies":{"tape":"^4.6.0"},"repository":{"type":"git","url":"git://github.com/chilts/12factor-config.git"},"bugs":{"url":"http://github.com/chilts/12factor-config/issues"},"author":{"name":"Andrew Chilton","email":"andychilton@gmail.com","url":"http://www.chilts.org/"},"contributors":[{"name":"Stuart Clark","email":"stuart.clark@Jahingo.com","url":"https://github.com/stuart-c"},{"name":"Andy McConnell","email":"amcconnell@fusionalliance.com","url":"https://github.com/naptowncode"}],"keywords":["config","env","environment","12factor"],"license":"MIT","gitHead":"66223a4c8bdf2261e90371a5a91fd891fbdc7008","_id":"12factor-config@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"chilts","email":"andychilton@gmail.com"},"dist":{"integrity":"sha512-pvtjLdzmBKW1Oj24Js+dgFXyMNIXh0xx6CmQ8Oyvnt3tBQmmk6mWG0mbwfzsd5U2ZGCpiIPfW2q193pOxMnRzg==","shasum":"42dc81bb828b8da22f6f61b9b0dcd63c2def220f","tarball":"https://registry.npmjs.org/12factor-config/-/12factor-config-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2v7XmfSXbtKJ5gvrjOrgkMzOOQMe3fBmefc5TAUOIUwIhAL3R4daAS3HEsBJBzT7i1tZS0xMUBJ7+vTGBjGFaBV4n"}]},"maintainers":[{"name":"chilts","email":"andychilton@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/12factor-config-2.0.0.tgz_1517914577709_0.5686636928003281"}}},"readme":"# 12factor-config #\n\nA config module which only reads the environment. For Node.js that means `process.env`.\n\nNote 1 : We will not ever use `NODE_ENV` in any example here since each environment\nshould specify everything it needs and nothing should be dependent on being a particular\nenvironment (such as 'development', 'testing', 'staging' or 'production').\n\nNote 2 : This package is considered stable so the fact that there are few commits these\ndays is no sign of inactivity, just stability. Please use and submit PRs for bugs. New\nfeatures will be considered too.\n\n## Stability ##\n\nPlease note that this project is pretty much feature complete. Issues will be fixed. New\nfeatures may be added if necessary. Otherwise it won't have very many more releases - but\nrest assured I will support it and you. The project is not dead, it is merely resting.\n\n## Synopsis ##\n\nFirstly, set some environment variables that your program will look for. You don't need\nto set any that have a 'default' but you do need to set any that are 'required'.\n\n```bash\n$ export REDIS_URL=redis://user:password@hostname:port/db\n$ export APPNAME_PORT=8080\n```\n\nThen, in your program:\n\n```javascript\nvar config = require('12factor-config');\n\nvar cfg = config({\n    redisUrl : {\n        env      : 'REDIS_URL',\n        type     : 'string', // default\n        required : true,\n    },\n    logfile : {\n        env      : 'APPNAME_LOG_FILE',\n        type     : 'string',\n        default  : '/var/log/appname.log',\n        required : true,\n    },\n    port : {\n        env      : 'APPNAME_PORT',\n        type     : 'integer',\n        default  : '8000',\n        required : true,\n    },\n    debug : {\n        env      : 'APPNAME_DEBUG',\n        type     : 'boolean',\n        default  : false,\n    },\n    env : {\n        // you really shouldn't use this, but some people/packages do\n        env      : 'NODE_ENV',\n        type     : 'enum',\n        values   : [ 'development', 'test', 'stage', 'production', ],\n    },\n});\n\nconsole.log(cfg);\n```\n\nShould output something like:\n\n```\n{\n  redisUrl: 'redis://user:password@hostname:port/db',\n  logfile: '/var/log/appname.log',\n  port: 8080,\n  debug: false,\n  env: 'development'\n}\n```\n\nIt is advisable to prefix your environment variables with a prefix related to your application\nname as shown in the later config vars above. Mainly this is to namespace your vars and not stomp\nover others already defined. Of course you don't need to use the prefix in the local name.\n\n## Valid Values ##\n\nWhen you have certain types, some transformations are performed to get it from a string (since the\nenvironment only contains string) into the required value.\n\n* `boolean` - upper or lower case is allowed\n    * true - 'true', 't', 'yes', 'y', 'on', '1'\n    * false - 'false', 'f', 'no', 'n', 'off', '0'\n    * any other value throws\n\n## What I Do ##\n\nI usually have a `lib/cfg.js` such as the following:\n\n```javascript\nvar config = require('12factor-config');\n\nvar cfg = config({\n    // ... environment config here ...\n});\n\nmodule.exports = cfg;\n```\n\nBy doing this, all other files in your application can just `require('lib/cfg.js')` and obtain\nthe exact same configuration.\n\n## Author ##\n\nWritten by [Andrew Chilton](https://chilts.org/) -\n[Twitter](https://twitter.com/andychilton).\n\n## License ##\n\nMIT - http://chilts.mit-license.org/2013/\n\n(Ends)\n","maintainers":[{"name":"chilts","email":"andychilton@gmail.com"}],"time":{"modified":"2022-06-12T14:05:41.644Z","created":"2014-01-09T21:36:13.237Z","0.1.0":"2014-01-09T21:36:14.243Z","1.0.0":"2014-08-27T05:15:37.819Z","1.0.1":"2015-05-25T09:28:58.195Z","1.1.0":"2015-12-10T21:01:09.857Z","1.2.0":"2016-07-18T21:36:55.600Z","1.2.1":"2016-07-18T21:43:33.015Z","1.3.0":"2016-10-07T10:28:02.677Z","1.3.1":"2016-10-20T22:28:02.109Z","2.0.0":"2018-02-06T10:56:17.771Z"},"repository":{"type":"git","url":"git://github.com/chilts/12factor-config.git"},"homepage":"https://github.com/chilts/12factor-config","keywords":["config","env","environment","12factor"],"author":{"name":"Andrew Chilton","email":"andychilton@gmail.com","url":"http://www.chilts.org/"},"bugs":{"url":"http://github.com/chilts/12factor-config/issues"},"readmeFilename":"README.md","users":{"jefrancomix":true,"cwagner":true,"moimikey":true},"contributors":[{"name":"Stuart Clark","email":"stuart.clark@Jahingo.com","url":"https://github.com/stuart-c"},{"name":"Andy McConnell","email":"amcconnell@fusionalliance.com","url":"https://github.com/naptowncode"}],"license":"MIT"}