Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
f7c105d3
Unverified
Commit
f7c105d3
authored
Jun 14, 2023
by
Michael Novotny
Committed by
GitHub
Jun 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds `env` suggestions (#51312)
Adds suggestions from #51063, which didn't get applied before merge.
parent
d492b937
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
03-environment-variables.mdx
...r-application/06-configuring/03-environment-variables.mdx
+2
-2
No files found.
docs/02-app/01-building-your-application/06-configuring/03-environment-variables.mdx
View file @
f7c105d3
...
...
@@ -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
`http
s://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
.
`\$`
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment