Add frontend environment configuration for API URL injection
- .env.example: Documentation template - .env.development: Local dev defaults (localhost:5000) - .env.production: Production defaults (relative /graphql path) - Updated .gitignore to track non-secret env files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
66f6fa138d
commit
c4a27f0bac
4 changed files with 15 additions and 2 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -169,9 +169,11 @@ $RECYCLE.BIN/
|
|||
# Environment & Secrets
|
||||
# ============================================
|
||||
.env
|
||||
.env.*
|
||||
.env.local
|
||||
.env.*.local
|
||||
!.env.example
|
||||
!.env.*.example
|
||||
!.env.development
|
||||
!.env.production
|
||||
*.pem
|
||||
*.key
|
||||
*.p12
|
||||
|
|
|
|||
2
frontend/.env.development
Normal file
2
frontend/.env.development
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# Development environment defaults
|
||||
VITE_GRAPHQL_ENDPOINT=http://localhost:5000/graphql
|
||||
7
frontend/.env.example
Normal file
7
frontend/.env.example
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Books Frontend Environment Configuration
|
||||
# Copy this file to .env.local and adjust values for your environment
|
||||
|
||||
# GraphQL API endpoint
|
||||
# Development: http://localhost:5000/graphql
|
||||
# Production: /graphql (relative, proxied by nginx/ingress)
|
||||
VITE_GRAPHQL_ENDPOINT=http://localhost:5000/graphql
|
||||
2
frontend/.env.production
Normal file
2
frontend/.env.production
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# Production environment - uses relative path (proxied by nginx/ingress)
|
||||
VITE_GRAPHQL_ENDPOINT=/graphql
|
||||
Loading…
Add table
Add a link
Reference in a new issue