Using Environment Variables in Next.JS application

2 years ago23k times

Environment Variables can be used with the following code.

Environment Variable

NEXT_PUBLIC_HOSTING_VARAIBLE=localhost

to access the environment variable in Component

process.env.NEXT_PUBLIC_HOSTING_VARAIBLE


Add Answer

Add a codeAdd Code
Remove adsremove

Latest codes

view all

Latest Snippets

view all