Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
dot-env-json
Advanced tools
Package similar to dotenv to read from .json files. It looks for files based on NODE_ENV. Ex: .env.development.json
import dotenv from "dot-env-json";
dotenv();
node -r dot-env-json/lib/config
# change base directory from root
node -r dot-env-json/lib/config dotenv_config_base=config/
Accepts an options object. Only valid option currently is base which sets the base path to look for files.
import dotenv from "dot-env-json";
# approot/config/.env.development.json
dotenv({
base: "config/"
});
Since this package uses NODE_ENV it is recommended to use the cross-env package to set the environment in your run scripts
# gets the json file approot/env.test.json
cross-env NODE_ENV=test node -r dot-env-json/lib/config yourfile.js
# gets the json file approot/config/env.development.json
cross-env NODE_ENV=development node -r dot-env-json/lib/config dotenv_config_base=config/ yourfile.js
FAQs
package similar to dotenv that reads from JSON file.
The npm package dot-env-json receives a total of 7 weekly downloads. As such, dot-env-json popularity was classified as not popular.
We found that dot-env-json 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.