NEXT_PUBLIC_GA_TRACKING_ID=UA-DEV-123456 DATABASE_URL=postgresql://user:pass@localhost:5432/dev_db NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
In simple terms, .env.development is a plain text file used to store environment variables specifically for the . .env.development
: The file must be named exactly .env.development . Typos will cause the system to ignore it. .env.development
if (process.env.NODE_ENV === 'development') apiUrl = 'http://localhost:8000'; else if (process.env.NODE_ENV === 'production') apiUrl = 'https://api.myapp.com'; .env.development