envc-assert
v0.3.0
Published
A drop-in replacement for `envc` that also verifies specific environment variables are set.
Downloads
38
Maintainers
Readme
envc-assert
A drop-in replacement for
envc
that also verifies specific environment variables are set. When one or more keys are missing, a ReferenceError is thrown.
$ npm install envc-assert --save
API
var envc = require('envc-assert');
envc();
Example
.env
DB_HOST="someapp.5432.rds.amazonaws.com"
DB_USER="someapp"
.env-required
DB_HOST="localhost"
DB_USER=""
.env.test
TEST_DB_HOST="localhost"
TEST_DB_USER=""
.env-required.test
TEST_DB_HOST="localhost"
TEST_DB_USER=""