2.1.0 • Published 4 years ago

dotenv-vars v2.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

dotenv-vars

The slimmest module to load a .env file in your project path, setting each row in environment variables.

NPM

Installation

npm install --save dotenv-vars

Usage

  • Put a .env file in your project root containing one pair of environment variable on each row like NODE_ENV=debug
  • In the top of your main file put require('dotenv-vars')

Example

Supports both [Segment titles] as well as # comments

.env

[Environment]
NODE_ENV=debug
PORT=3000

[Amazon]
# AWS_ACCESS_KEY_ID=
# AWS_SECRET_ACCESS_KEY=
# AWS_SESSION_TOKEN=

index.js

require('dotenv-vars');

console.log(process.env.PORT);

Prints: 3000

2.1.0

4 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.13

5 years ago

1.0.12

6 years ago

1.0.11

7 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago