Using Environment Variables in Next.JS application

1 month 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