.env.example69 lines, 2.8 KB
| 1 | # API Gateway Environment Configuration |
| 2 | |
| 3 | # ============================================================================= |
| 4 | # SERVER CONFIGURATION |
| 5 | # ============================================================================= |
| 6 | PORT=8080 |
| 7 | NODE_ENV=development |
| 8 | |
| 9 | # ============================================================================= |
| 10 | # JWT CONFIGURATION (for token validation) |
| 11 | # ============================================================================= |
| 12 | # IMPORTANT: Change these secrets in production! |
| 13 | # Generate strong, random secrets (minimum 256 bits) |
| 14 | JWT_SECRET=your-super-secret-jwt-key-change-this-in-production |
| 15 | |
| 16 | # ============================================================================= |
| 17 | # SERVICE URLS |
| 18 | # ============================================================================= |
| 19 | # URLs for microservices communication |
| 20 | AUTH_SERVICE_URL=http://localhost:3001 |
| 21 | USER_SERVICE_URL=http://localhost:3002 |
| 22 | NOTES_SERVICE_URL=http://localhost:3003 |
| 23 | TAGS_SERVICE_URL=http://localhost:3004 |
| 24 | |
| 25 | # ============================================================================= |
| 26 | # CORS CONFIGURATION |
| 27 | # ============================================================================= |
| 28 | # Frontend application URL |
| 29 | CORS_ORIGIN=http://localhost:3000 |
| 30 | CORS_CREDENTIALS=true |
| 31 | |
| 32 | # ============================================================================= |
| 33 | # LOGGING CONFIGURATION |
| 34 | # ============================================================================= |
| 35 | LOG_LEVEL=info |
| 36 | |
| 37 | # ============================================================================= |
| 38 | # HEALTH CHECK CONFIGURATION |
| 39 | # ============================================================================= |
| 40 | HEALTH_CHECK_INTERVAL=30000 |
| 41 | HEALTH_CHECK_TIMEOUT=5000 |
| 42 | |
| 43 | # ============================================================================= |
| 44 | # PRODUCTION EXAMPLES (uncomment and modify for production) |
| 45 | # ============================================================================= |
| 46 | |
| 47 | # Production JWT secret (generate a strong secret) |
| 48 | # JWT_SECRET=your-production-jwt-secret-256-bits-minimum |
| 49 | |
| 50 | # Production service URLs (update with your production URLs) |
| 51 | # AUTH_SERVICE_URL=https://auth.your-domain.com |
| 52 | # USER_SERVICE_URL=https://users.your-domain.com |
| 53 | # NOTES_SERVICE_URL=https://notes.your-domain.com |
| 54 | # TAGS_SERVICE_URL=https://tags.your-domain.com |
| 55 | |
| 56 | # Production CORS (restrict to your frontend domain) |
| 57 | # CORS_ORIGIN=https://your-frontend-domain.com |
| 58 | |
| 59 | # Production logging |
| 60 | # LOG_LEVEL=warn |
| 61 | |
| 62 | # ============================================================================= |
| 63 | # DEVELOPMENT NOTES |
| 64 | # ============================================================================= |
| 65 | # 1. Copy this file to .env and update the values |
| 66 | # 2. Never commit .env files to version control |
| 67 | # 3. Use strong, unique secrets in production |
| 68 | # 4. Update service URLs based on your deployment environment |
| 69 | # 5. Configure CORS_ORIGIN to match your frontend application URL |