🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

env-yaml

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-yaml

Minimal YAML .env file loader

0.1.2
latest
Source
npm
Version published
Weekly downloads
2.3K
10.3%
Maintainers
1
Weekly downloads
 
Created
Source

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' });

Keywords

dotenv

FAQs

Package last updated on 23 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts