env-autoload
v1.1.0
Published
Shortcut for loading .env files automatically.
Downloads
75
Maintainers
Readme
.env autoloader
Why?
Because who wants bootstrap files in their boilerplate/templates? This is really just a code-smell implementation fix for using the wonderful dotenv library.
Usage
.env
TEST='foo bar baz'
index.js (server)
import env from 'env-autoload' // require('env-autoload') works fine too
process.env.TEST === 'foo bar baz' // true
env.TEST === 'foo bar baz' // also true (convenience export)
Changelog
- 1.1.0 - added process.env as convenience export (as well as to pass linting tests)