feat: basePath-Konfiguration von .env in config.json verschoben
basePath wird jetzt in config.json gepflegt statt als NEXT_PUBLIC_BASE_PATH in .env.* Alle relevanten Code-Stellen lesen basePath dynamisch aus config.json Dokumentation und Beispiele in Markdown-Dateien entsprechend angepasst Erhöhte Flexibilität für Deployments ohne Rebuild
This commit is contained in:
@@ -12,17 +12,17 @@ NodeMap verwendet Umgebungsvariablen zur Steuerung von API-Verhalten, Serverpfad
|
||||
|
||||
## 🔧 Wichtige Variablen
|
||||
|
||||
| Variable | Beispielwert | Beschreibung |
|
||||
| --------------------------- | ------------------- | --------------------------------------------------------------------- |
|
||||
| `DB_HOST` | `localhost` | Adresse des Datenbankservers (MySQL) |
|
||||
| `DB_PORT` | `3306` | Port für die Datenbankverbindung |
|
||||
| `DB_NAME` | `talas` | Datenbankname |
|
||||
| `DB_USER` | `root` | Benutzername für MySQL |
|
||||
| `DB_PASSWORD` | `geheim` | Passwort für MySQL |
|
||||
| `NEXT_PUBLIC_API_PORT_MODE` | `prod` oder `dev` | Steuert API-Routing bei Services (z. B. Portwechsel für lokal) |
|
||||
| `NEXT_PUBLIC_USE_MOCKS` | `true` oder `false` | Aktiviert den Mockdaten-Modus über `/api/mocks/...` |
|
||||
| `NEXT_PUBLIC_BASE_PATH` | `/talas5` oder leer | Optionaler Pfad, falls App unter Subpfad läuft (z. B. IIS) |
|
||||
| `NEXT_PUBLIC_DEBUG` | `true` oder `false` | Aktiviert zusätzliche `console.log` Ausgaben für Debugging im Browser |
|
||||
| Variable | Beispielwert | Beschreibung |
|
||||
| --------------------------- | ------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| `DB_HOST` | `localhost` | Adresse des Datenbankservers (MySQL) |
|
||||
| `DB_PORT` | `3306` | Port für die Datenbankverbindung |
|
||||
| `DB_NAME` | `talas` | Datenbankname |
|
||||
| `DB_USER` | `root` | Benutzername für MySQL |
|
||||
| `DB_PASSWORD` | `geheim` | Passwort für MySQL |
|
||||
| `NEXT_PUBLIC_API_PORT_MODE` | `prod` oder `dev` | Steuert API-Routing bei Services (z. B. Portwechsel für lokal) |
|
||||
| `NEXT_PUBLIC_USE_MOCKS` | `true` oder `false` | Aktiviert den Mockdaten-Modus über `/api/mocks/...` |
|
||||
| `basePath` (in config.json) | `/talas5` oder leer | Optionaler Pfad, falls App unter Subpfad läuft (z. B. IIS). Wird jetzt in `public/config.json` gepflegt. |
|
||||
| `NEXT_PUBLIC_DEBUG` | `true` oder `false` | Aktiviert zusätzliche `console.log` Ausgaben für Debugging im Browser |
|
||||
|
||||
## 📦 Beispiel `.env.production`
|
||||
|
||||
@@ -34,7 +34,11 @@ DB_USER=root
|
||||
DB_PASSWORD=geheim
|
||||
NEXT_PUBLIC_API_PORT_MODE=prod
|
||||
NEXT_PUBLIC_USE_MOCKS=false
|
||||
NEXT_PUBLIC_BASE_PATH=/talas5
|
||||
// public/config.json
|
||||
{
|
||||
...
|
||||
"basePath": "/talas5"
|
||||
}
|
||||
NEXT_PUBLIC_DEBUG=false
|
||||
```
|
||||
|
||||
@@ -48,7 +52,11 @@ DB_USER=root
|
||||
DB_PASSWORD=geheim
|
||||
NEXT_PUBLIC_API_PORT_MODE=dev
|
||||
NEXT_PUBLIC_USE_MOCKS=true
|
||||
NEXT_PUBLIC_BASE_PATH=/talas5
|
||||
// public/config.json
|
||||
{
|
||||
...
|
||||
"basePath": "/talas5"
|
||||
}
|
||||
NEXT_PUBLIC_DEBUG=true
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user