Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(learn): env var tutorial link to Environment Variables docs
Adjust the link in the "How to read environment variables from Node.js"
tutorial to refer to the environment variables documentation added in
24.5.0.

Fixes #7995
  • Loading branch information
mureinik committed Aug 1, 2025
commit 34a174b2395196ceacd89d097e7025eb83872e82
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ console.log(process.env.USER_KEY); // "foobar"

In the same way you can access any custom environment variable you set.

Node.js 20 introduced **experimental** [support for .env files](https://nodejs.org/dist/latest-v22.x/docs/api/cli.html#--env-fileconfig).
Node.js 20 introduced **experimental** [support for .env files](https://nodejs.org/docs/v24.5.0/api/environment_variables.html#env-files).

Now, you can use the `--env-file` flag to specify an environment file when running your Node.js application. Here's an example `.env` file and how to access its variables using `process.env`.

Expand Down
Loading