fix(dev): proxy local API and restrict frontend upstream

This commit is contained in:
2026-08-04 15:58:13 +02:00
parent 8ffcaf3db9
commit 87b0fda3f6
7 changed files with 114 additions and 9 deletions
+2 -2
View File
@@ -55,10 +55,10 @@ trap cleanup EXIT INT TERM
) &
pids+=($!)
# Frontend: punta al backend reale.
# Frontend: il browser usa sempre /api; Vite lo inoltra al backend locale.
(
cd "$FRONTEND"
VITE_BACKEND_URL="http://localhost:$BACKEND_PORT" \
THT_FRONTEND_API_UPSTREAM="http://localhost:$BACKEND_PORT" \
npm run dev -- --port "$FRONTEND_PORT"
) &
pids+=($!)