Skip to content

seed-media/env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published