Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 515 Bytes

README.md

File metadata and controls

25 lines (16 loc) · 515 Bytes

Environment Loader/Reader

Usage

const env = require('@seed-media/env')

// Getting variables
const databaseHost = env.get('DB_HOST')

// Getting variables with a default
const endpoint = env.get('ENDPOINT', 'https://localhost')

// Setting variables
env.set('MY_ENV_VAR', 'value')

## Notes

Truthy or falsey envrionment variables are converted to boolean values. For example

FOO=true // bool true
FOO=1 // bool true
FOO=false // bool false
FOO=0 // bool false