dotenv
A popular npm package that reads a .env file into process.env, which Node.js can now do natively with --env-file.
In more detail
Older projects call require("dotenv").config() at start-up. The built-in flag and process.loadEnvFile() remove that dependency.
Related terms
- --env-file — A Node.js command-line flag that loads variables from a .env file into process.env before your code runs, with no package needed.
- npm — The package manager that comes with Node.js, plus the public registry where JavaScript packages are published.
- third-party package — Code written by someone other than you or the Node.js project, usually installed from the npm registry.
Taught in
- Runtime Configuration: CLI Flags & Native --env-file — Node.js Internals & Backend Services