feat: extract secrets to .env, remove hardcoded credentials
- Backend: .env file for DB/JWT/Redis/MinIO config, appsettings.json cleared - Backend: Program.cs loads .env at startup (no extra NuGet packages) - Frontend: .env files for VITE_API_URL, api-clients use import.meta.env - Added vite-env.d.ts type declarations for both frontends - All hardcoded localhost:5000 replaced with env variable - Added .env.example template for onboarding
This commit is contained in:
15
backend/.env.example
Normal file
15
backend/.env.example
Normal file
@@ -0,0 +1,15 @@
|
||||
# PostgreSQL
|
||||
ConnectionStrings__Default=Host=localhost;Port=5432;Database=health_manager;Username=postgres;Password=your_password
|
||||
|
||||
# JWT
|
||||
Jwt__Secret=your-jwt-secret-change-me
|
||||
Jwt__Issuer=HealthManager
|
||||
Jwt__Audience=HealthManagerApp
|
||||
|
||||
# Redis (reserved)
|
||||
Redis__Connection=localhost:6379
|
||||
|
||||
# MinIO (reserved)
|
||||
MinIO__Endpoint=localhost:9000
|
||||
MinIO__AccessKey=minioadmin
|
||||
MinIO__SecretKey=minioadmin
|
||||
Reference in New Issue
Block a user