Skip to content

jrwells/env-yaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

env-yaml

Usage

require('env-yaml').config();

Create a .env.yml file in the root dirctory of your project, and add environment-specific variables as valid YAML.

That's it.

process.env now has the keys and values you defined in your .env.yml file.

Options

Path

Default: .env.yml

You can specify a custom path if your file containing environmnet variables is named or located differently.

require('env-yaml').config({ path: '/custom/path/to/your/yaml/env/vars' });

Encoding

Default: utf8

You may specify the encoding of your file containing environment variables using this option.

require('env-yaml').config({ encoding: 'base64' });

About

Minimal YAML .env file loader

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published