This commit is contained in:
2026-01-14 13:11:07 +00:00
parent 0a4a1d3e48
commit ad6f1ed6c5
25 changed files with 8685 additions and 1662 deletions
+7 -4
View File
@@ -24,7 +24,7 @@ python3 box/main.py run
Frontend only:
```
cd gui/frontend
npm run dev -- --host 0.0.0.0 --port 5174 --strictPort
VITE_BACKEND_URL=http://127.0.0.1:5001 npm run dev -- --host 0.0.0.0 --port 5174 --strictPort
```
Backend only:
```
@@ -37,10 +37,12 @@ npm run dev
- Frontend GUI: `http://127.0.0.1:5174`
- Box API: `http://127.0.0.1:8000`
- Setup UI: `http://127.0.0.1:9000/setup`
- GUI: `http://127.0.0.1:5174`
- Box2 API (optional): `http://127.0.0.1:8001`
- Box2 Setup (optional): `http://127.0.0.1:9001/setup`
## API-URL fuer die GUI
Default ist `http://<HOST-IP>:5001` (aus `hostname -I`). Override:
Die GUI nutzt relative Pfade (`/api/...`) und einen Vite-Proxy.
Der Proxy-Target wird so gesetzt:
```
KLANGKISTE_BACKEND_URL=http://<server-ip>:5001 ./dev.sh
VITE_BACKEND_URL=http://<server-ip>:5001 npm run dev
@@ -67,4 +69,5 @@ VITE_BACKEND_URL=http://<server-ip>:5001 npm run dev
- CORS-Fehler:
- API muss laufen und erreichbar sein.
- GUI zeigt "Failed to fetch":
- `VITE_BACKEND_URL` pruefen.
- Vite-Proxy pruefen (`VITE_BACKEND_URL`).
- Reverse-Proxy: `/api` muss auf das Backend zeigen (ohne doppeltes `/api`).