Unverified Commit 3b3d249c authored by Zane Chua's avatar Zane Chua Committed by GitHub

Update edge-runtime.md (#38271)

* Update edge-runtime.md

* Update docs/api-reference/edge-runtime.md

* fix linting
Co-authored-by: 's avatarLee Robinson <me@leerob.io>
Co-authored-by: 's avatarBalázs Orbán <info@balazsorban.com>
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 7f6b8ac7
...@@ -115,6 +115,15 @@ The Next.js Edge Runtime is based on standard Web APIs, which is used by [Middle ...@@ -115,6 +115,15 @@ The Next.js Edge Runtime is based on standard Web APIs, which is used by [Middle
You can use `process.env` to access [Environment Variables](/docs/basic-features/environment-variables.md) for both `next dev` and `next build`. You can use `process.env` to access [Environment Variables](/docs/basic-features/environment-variables.md) for both `next dev` and `next build`.
Running `console.log` on `process.env` **will not** show all your Environment Variables. You have to access the variables directly as shown below:
```javascript
console.log(process.env)
// { NEXT_RUNTIME: 'edge' }
console.log(process.env.TEST_VARIABLE)
// { NEXT_RUNTIME: 'edge', TEST_VARIABLE: 'value' }
```
## Unsupported APIs ## Unsupported APIs
The Edge Runtime has some restrictions including: The Edge Runtime has some restrictions including:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment