0.5.5 • Published 6 years ago

dotenv-minimal v0.5.5

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

dotenv-minimal

It is simple enough to just load the .env files into process.env . Features:

  • Zero-dependency,
  • Simple and clean,
  • less than 50 lines,
  • Easy enough to add your own customizations in to it.

Install

npm install dotenv-minimal --save

Usage

Require it in your entry file:

require('dotenv-minimal')

Create a .env file in the root directory of your project. Add environment specific variables on new lines in the form of KEY=VALUE. For example:

# Single Value
NODE_ENV=development
PORT=8000

# Multi Value Environment Variables seperated by comma
CLIENT_ID=APP,WEB,API

# Supports multiple = in the same line
BASIC_AUTH=Authorisation QWswcwevRQQQEWFEWEFE==

That's it.

process.env now has the keys and values you defined in your .env file.

Development Setup steps:

  • clone the repo
  • npm install --save-dev eslint-config-airbnb-base eslint eslint-plugin-import
  • npm install
0.5.5

6 years ago

0.5.4

7 years ago

0.5.3

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago