Purpose: This app demonstrates the difference between build-time and runtime environment variables in Next.js.
Build-time vars (NEXT_PUBLIC_*): Baked into the JavaScript bundle. Require rebuild to change.
Runtime vars: Server-side only. Update instantly with pod restart.
Environment Test App - Productionhttps://api.galaxyhvh.comUA-PROD-12345true2026-01-21โ
These variables are accessible in the browser via process.env.NEXT_PUBLIC_*
๐ To change these: Update env vars โ Trigger redeploy โ Wait 2-3 minutes for rebuild
Loading server environment...
โ Database Not Connected
No database credentials configured
How to test:
1. Link a database to this app via Dashboard โ Integrations
2. System injects DATABASE_URL and other variables
3. Click "Test Connection" to verify
4. Variables are runtime-only (secure, not in browser)
โ Object Storage Not Connected
No storage credentials configured
How to test:
1. Link an object storage bucket to this app via Dashboard โ Integrations
2. System injects S3_* environment variables
3. Click "Test Connection" to verify bucket access
4. Variables are runtime-only (secure, not in browser)
โ Scenario 1: Update NEXT_PUBLIC_* variable โ Triggers rebuild โ Takes 2-3 min
โ Scenario 2: Update runtime variable (e.g., API_SECRET_KEY) โ No rebuild โ Takes 30 sec
โ Scenario 3: Link database โ Injects DATABASE_* vars โ App restarts โ Test connection works
โ Scenario 4: Link bucket โ Injects S3_* vars โ App restarts โ Test connection works
โ Scenario 5: View page source โ NEXT_PUBLIC_* visible โ Runtime vars NOT visible (secure)