.env.development ^hot^ Jun 2026

However, for the vast majority of developers—from solo freelancers to large teams—the simplicity and transparency of .env.development remain the gold standard.

import z from 'zod'; const EnvSchema = z.object( DATABASE_URL: z.string().url(), PORT: z.coerce.number().default(3000), );

: Keep local development settings separate from production secrets. .env.development

In the modern landscape of software development, applications rarely run in a single environment. Code moves from a developer’s local machine to a testing server, and finally to production. Each of these stages requires different configurations—different database credentials, API keys, and debug settings. One of the most effective tools for managing these variations is the environment file. Specifically, the .env.development file serves as the blueprint for your application while you are building it.

.env.local .env.*.local .env.production # But keep .env.development if it has safe defaults However, for the vast majority of developers—from solo

| Framework/Tool | Load order (higher priority last) | |----------------|-----------------------------------| | Create React App | .env → .env.development → .env.local → .env.development.local | | Vue CLI | same as CRA | | Next.js | .env → .env.development → .env.local → .env.development.local | | Node.js + dotenv | manually configured (recommended: dotenv.config( path: '.env.development' ) ) |

DB_HOST=localhost DB_PORT=5432 DB_NAME=myapp_dev_db DB_USER=dev_user DB_PASSWORD=dev_password_123 # --- THIRD-PARTY INTEGRATIONS (TEST KEYS) --- Code moves from a developer’s local machine to

console.log( Loading config for: $process.env.NODE_ENV ); module.exports = ...process.env ;