Skip to content
Merged
Prev Previous commit
Next Next commit
content(learn cli): fix link
  • Loading branch information
AugustinMauroy committed Dec 2, 2024
commit 13ec0c1d9f62ec5b7620212cb65f1cc5ab67170c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ 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-v20.x/docs/api/cli.html#--env-fileconfig).
Node.js 20 introduced **experimental** [support for .env files](https://nodejs.org/dist/latest-v22.x/docs/api/cli.html#--env-fileconfig).

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