Skip to content

Commit

Permalink
Adds env suggestions (#51312)
Browse files Browse the repository at this point in the history
Adds suggestions from #51063, which didn't get applied before merge.
  • Loading branch information
manovotny authored Jun 14, 2023
1 parent d492b93 commit f7c105d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ This loads `process.env.DB_HOST`, `process.env.DB_USER`, and `process.env.DB_PAS
Next.js will automatically expand variables that use `$` to reference other variables e.g. `$VARIABLE` inside of your `.env*` files. This allows you to reference other secrets. For example:

```txt filename=".env"
TWITTER_USER=vercel
TWITTER_USER=nextjs
TWITTER_URL=https://twitter.com/$TWITTER_USER
```

In the above example, `process.env.TWITTER_URL` would be set to `http://twitter.com/vercel`.
In the above example, `process.env.TWITTER_URL` would be set to `https://twitter.com/nextjs`.

> **Good to know**: If you need to use variable with a `$` in the actual value, it needs to be escaped e.g. `\$`.
Expand Down

0 comments on commit f7c105d

Please sign in to comment.