1.0.3 • Published 6 years ago
iox-env v1.0.3
iox-env
The simple .env loader for the process.env
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