Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
dotenv-yaml
Advanced tools
As early as possible in your application, require and configure dotenv-yaml.
require('dotenv-yaml').config();
You can use the --require
(-r
) command line option to preload dotenv-yaml. By doing this, you do not need to require and load dotenv-yaml in your application code.
$ node -r dotenv-yaml/config your_script.js
The configuration options below are supported as command line arguments in the format dotenv_yaml_config_<option>=value
$ node -r dotenv-yaml/config your_script.js dotenv_yaml_config_path=/custom/path/to/your/env/vars dotenv_yaml_config_encoding=utf8
Create a .env.yml
file in the root directory 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.
Default: .env.yml
You can specify a custom path if your file containing environmnet variables is named or located differently.
require('dotenv-yaml').config({ path: '/custom/path/to/your/yaml/env/vars' });
Default: utf8
You may specify the encoding of your file containing environment variables using this option.
require('dotenv-yaml').config({ encoding: 'base64' });
FAQs
Minimal YAML .env.yml file loader
We found that dotenv-yaml demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.