env-autoload

1.1.0 • Public • Published

.env autoloader

npm version node version support Build Status via Travis CI Coverage Status NPM downloads

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)

Package Sidebar

Install

npm i env-autoload

Weekly Downloads

43

Version

1.1.0

License

MIT

Unpacked Size

133 kB

Total Files

13

Last publish

Collaborators

  • krwhitley