kilokeith / with-env

Read and apply .env file (if exists) in the working directory.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

with-env

Read and apply .env file (if exists) in the working directory.

Install

$ npm install with-env

Usage

Create an .env file:

PORT=8080
AWS_KEY=abcde
DB=user@foobar.com/corge

And call with-env on top of your module:

require('with-env')()

console.log(process.env.AWS_KEY)
// => 'abcde'

About

Read and apply .env file (if exists) in the working directory.


Languages

Language:JavaScript 100.0%