Skip to content

Setup: Add support for environment-specific .env files - #1

Merged
iuriimqa merged 1 commit into
iuriimqa:mainfrom
axisrow:feature/env-setup
Nov 19, 2025
Merged

iuriimqa merged 1 commit into
iuriimqa:mainfrom
axisrow:feature/env-setup

Conversation

@axisrow

@axisrow axisrow commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Add support for loading environment-specific .env files (.env.local for development, .env for production)
  • Enables secure separation of local development credentials and production credentials

Changes

  • Created server/db.js with NODE_ENV detection for loading appropriate .env file
  • Development mode (default) uses .env.local (not tracked in git)
  • Production mode uses .env (should be set in deployment environment)
  • Created server/.gitignore to prevent .env files from being committed

How it works

// In development (NODE_ENV not set):
require('dotenv').config({ path: '.env.local' })

// In production (NODE_ENV=production):
require('dotenv').config({ path: '.env' })

🤖 Generated with Claude Code

- Add support for loading environment-specific .env files (.env.local for development, .env for production)
- Enables secure separation of local development credentials and production credentials
- Remove .env from tracking and update gitignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@iuriimqa
iuriimqa merged commit 45947c2 into iuriimqa:main Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants