- frontend/ mit Vite 8, React 19, React Router 8, TanStack Query 5, TS 7 - api.ts: Fehler allein über HTTP-Status (ApiError), errMsg wie bisher - types.ts: API-Antworten laut notes/api.md - Layout mit unverändertem Header-Markup, app.css als Kopie - Dev-Proxy für /api und /static aufs Go-Backend - Containerfile: HEALTHCHECK auf /api/stats Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TiXsPUqw7oeomZ8wZrQW5q
18 lines
523 B
TypeScript
18 lines
523 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
// Im Dev-Betrieb läuft das Go-Backend separat (siehe dev.env, Port 8081).
|
|
// Vite reicht /api und /static dorthin durch -- für den Browser bleibt alles
|
|
// eine Origin, Session-Cookie und Origin-Check funktionieren unverändert.
|
|
const backend = process.env.KVER_BACKEND ?? "http://127.0.0.1:8081";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
proxy: {
|
|
"/api": backend,
|
|
"/static": backend,
|
|
},
|
|
},
|
|
});
|