.env.development
The primary goal of using a .env.development file is to . This ensures that your application behaves correctly in your local environment while remaining flexible enough to switch to different settings when deployed to staging or production.
DB_HOST=localhost DB_PORT=5432 DB_USERNAME=myuser DB_PASSWORD=mypassword API_KEY=your_api_key_here .env.development
: Use the dotenv package to load these variables into process.env . The primary goal of using a
| File Name | Typical Usage | | :--- | :--- | | .env | The fallback or default file. Contains base variables. | | | Loaded specifically during local development ( npm start or dev ). | | .env.production | Loaded when the app is built for production. | | .env.test | Loaded during unit/integration testing (e.g., Jest). | | File Name | Typical Usage | | :--- | :--- | |
# External APIs (Using Test/Sandbox Keys) SENDGRID_API_KEY=SG.test.fakekey STRIPE_SECRET_KEY=sk_test_12345