1.0.3 • Published 6 years ago

iox-env v1.0.3

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

iox-env

The simple .env loader for the process.env

npm Travis (.com) Codecov Known Vulnerabilities JavaScript Style Guide Greenkeeper badge

Installation

npm install iox-env --save

The values is string and not filtered.

.env

# Sample comment

# Create new variable
NAME=.env

# Create other variable
YEAR=2019

Example

const env = require('iox-env')
const path = require('path')

env(path.join(__dirname, '.env'))

const name = process.env.NAME
const year = process.env.YEAR

Load the .env in root path (new in version 1.0.3)

require('iox-env')()

const name = process.env.NAME
const year = process.env.YEAR
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago