.env.example88 lines, 3.7 KB
| 1 | # Notes Service Environment Configuration |
| 2 | |
| 3 | # ============================================================================= |
| 4 | # DATABASE CONFIGURATION |
| 5 | # ============================================================================= |
| 6 | # PostgreSQL connection string for notes service |
| 7 | DATABASE_URL=postgresql://notesverb:your_secure_password_here@localhost:5432/notesverb_notes |
| 8 | |
| 9 | # ============================================================================= |
| 10 | # SERVER CONFIGURATION |
| 11 | # ============================================================================= |
| 12 | PORT=3003 |
| 13 | NODE_ENV=development |
| 14 | |
| 15 | # ============================================================================= |
| 16 | # AUTH SERVICE CONFIGURATION |
| 17 | # ============================================================================= |
| 18 | # URL for auth service communication |
| 19 | AUTH_SERVICE_URL=http://localhost:3001 |
| 20 | |
| 21 | # JWT secret for token validation (must match auth service) |
| 22 | JWT_SECRET=your-super-secret-jwt-key-change-this-in-production |
| 23 | |
| 24 | # ============================================================================= |
| 25 | # TAGS SERVICE CONFIGURATION |
| 26 | # ============================================================================= |
| 27 | # URL for tags service communication |
| 28 | TAGS_SERVICE_URL=http://localhost:3004 |
| 29 | |
| 30 | # ============================================================================= |
| 31 | # CORS CONFIGURATION |
| 32 | # ============================================================================= |
| 33 | # Frontend application URL |
| 34 | CORS_ORIGIN=http://localhost:3000 |
| 35 | CORS_CREDENTIALS=true |
| 36 | |
| 37 | # ============================================================================= |
| 38 | # SECURITY CONFIGURATION |
| 39 | # ============================================================================= |
| 40 | # Bcrypt rounds for password hashing (if needed) |
| 41 | BCRYPT_ROUNDS=10 |
| 42 | |
| 43 | # ============================================================================= |
| 44 | # PRODUCTION EXAMPLES (uncomment and modify for production) |
| 45 | # ============================================================================= |
| 46 | |
| 47 | # Production database URL |
| 48 | # DATABASE_URL=postgresql://username:password@host:port/database_name |
| 49 | |
| 50 | # Production service URLs |
| 51 | # AUTH_SERVICE_URL=https://auth.your-domain.com |
| 52 | # TAGS_SERVICE_URL=https://tags.your-domain.com |
| 53 | |
| 54 | # Production JWT secret (must match auth service) |
| 55 | # JWT_SECRET=your-production-jwt-secret-256-bits-minimum |
| 56 | |
| 57 | # Production CORS (restrict to your frontend domain) |
| 58 | # CORS_ORIGIN=https://your-frontend-domain.com |
| 59 | |
| 60 | # ============================================================================= |
| 61 | # DEVELOPMENT CONFIGURATION |
| 62 | # ============================================================================= |
| 63 | # Development database (for local development with Docker) |
| 64 | # DATABASE_URL=postgresql://notesverb:notesverb123@localhost:5432/notesverb_notes |
| 65 | |
| 66 | # ============================================================================= |
| 67 | # TESTING CONFIGURATION |
| 68 | # ============================================================================= |
| 69 | # Test database URL (for running tests) |
| 70 | # TEST_DATABASE_URL=postgresql://notesverb:notesverb123@localhost:5432/notesverb_notes_test |
| 71 | |
| 72 | # Test service URLs |
| 73 | # TEST_AUTH_SERVICE_URL=http://localhost:3001 |
| 74 | # TEST_TAGS_SERVICE_URL=http://localhost:3004 |
| 75 | |
| 76 | # Test JWT secret (must match test auth service) |
| 77 | # TEST_JWT_SECRET=test-jwt-secret-key-for-testing-only |
| 78 | |
| 79 | # ============================================================================= |
| 80 | # DEVELOPMENT NOTES |
| 81 | # ============================================================================= |
| 82 | # 1. Copy this file to .env and update the values |
| 83 | # 2. Never commit .env files to version control |
| 84 | # 3. Ensure JWT_SECRET matches the auth service |
| 85 | # 4. Use environment-specific database URLs |
| 86 | # 5. Update service URLs based on your deployment environment |
| 87 | # 6. Consider using service discovery in production environments |
| 88 | # 7. Ensure tags service is accessible for note-tag relationships |