local-env-var

2.0.4 • Public • Published

Environment Variable Loader

Loading .env in to process.env

Codacy Badge Bless npm

Intro

This program strives to be a minimal way of loading variables from a configuration file (.env), and attaches them to process.env.

This works similarly to running your program with heroku local running dotenv.parse().

Prerequisites

All you need for this is a file named .env. Its contents should look like this:

CONTENTFUL_KEY=somesecretkey
CONTENTFUL_SPACE=somespaceurl
SECRET_API_KEY_THAT_WONT_GET_POSTED_TO_GIT=whoops

Usage

Simply load the library!

// ES6 imports
import 'local-env-var';
// Node module require
require('local-env-var');

Readme

Keywords

none

Package Sidebar

Install

npm i local-env-var

Weekly Downloads

6

Version

2.0.4

License

GPL-3.0

Unpacked Size

4.72 MB

Total Files

77

Last publish

Collaborators

  • hjfitz