// For client-side, remember the NEXT_PUBLIC_ prefix const appUrl = process.env.NEXT_PUBLIC_APP_URL;

The purpose of a .local suffix is to create a . Any variable defined in a .local file will overwrite the same variable defined elsewhere. These files are meant for configuration specific to your local machine and should never be committed to version control (always add *.local to your .gitignore ).

npm run build # Internally fires: next build (sets NODE_ENV to production) Use code with caution. Next.js detects that it is running in production mode.