Skip to content

Commit

Permalink
README: fix Environment Variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanelian committed Sep 16, 2022
1 parent 79c5409 commit f73d7a1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,13 @@ For example:
```ts
{
serverRuntimeConfig: {
demoApiHost: process.env['DEMO_API_HOST'],
oidcIssuer: process.env['OIDC_ISSUER'],
oidcClientId: process.env['OIDC_CLIENT_ID'],
oidcScope: process.env['OIDC_SCOPE'],
myEnv: process.env['MY_ENVIRONMENT_VARIABLE'],
},
}
```

> Read more for explanation about this behavior: https://www.saltycrane.com/blog/2021/04/buildtime-vs-runtime-environment-variables-nextjs-docker/
### Using `AppSettings`

Import the `AppSettings` object from `getServerSideProps` to read registered Environment Variables and pass it down to the page as props. For example:
Expand Down

0 comments on commit f73d7a1

Please sign in to comment.