File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,24 @@ function EnvTest() {
6
6
< div >
7
7
< h1 > Environment Variables</ h1 >
8
8
< a href = "https://nextjs.org/docs/basic-features/environment-variables" > Read Docs</ a >
9
- < p > By default environment variables are only available in the Node.js environment, meaning they won't be exposed to the browser.</ p >
10
9
< p >
11
- < code > NEXT_PUBLIC_</ code > environment variables are available in the browser, and can be used to configure the application.
10
+ By default environment variables are only available in the Node.js environment, meaning they won't be
11
+ exposed to the browser.
12
+ </ p >
13
+ < p >
14
+ < code > NEXT_PUBLIC_</ code > environment variables are available in the browser, and can be used to configure the
15
+ application.
16
+ </ p >
17
+ < p >
18
+ ✅ Public Environment token found:{ ' ' }
19
+ < code > { process . env . NEXT_PUBLIC_GREETINGS || 'NOT FOUND (something went wrong)' } </ code >
20
+ </ p >
21
+ < p >
22
+ ❌ Private Environment token should not be found:{ ' ' }
23
+ < code > { ( typeof document !== 'undefined' && process . env . TEST_ENV_VAR ) || 'Everything worked' } </ code >
12
24
</ p >
13
- < p > ✅ Public Environment token found: < code > { process . env . NEXT_PUBLIC_GREETINGS || 'NOT FOUND (something went wrong)' } </ code > </ p >
14
- < p > ❌ Private Environment token should not be found: < code > { process . env . TEST_ENV_VAR || 'Everything worked' } </ code > </ p >
15
25
</ div >
16
26
)
17
27
}
18
28
19
- export default EnvTest
29
+ export default EnvTest
You can’t perform that action at this time.
0 commit comments