feat: wire workspace CRUD UI to backend

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
tao.chen
2026-07-03 11:05:56 +08:00
co-authored by Claude
parent b3d0b63f4b
commit 867f1d204e
5 changed files with 213 additions and 2 deletions
+12
View File
@@ -3,6 +3,12 @@ import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
// In dev the frontend runs on its own port; proxy API calls to the Go backend
// so the browser sees same-origin requests. In production the Go binary serves
// the built assets directly and no proxy is involved.
const backendTarget =
process.env.VITE_BACKEND_URL ?? "http://localhost:8080";
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
@@ -10,4 +16,10 @@ export default defineConfig({
"@": path.resolve(__dirname, "./src"),
},
},
server: {
proxy: {
"/api": { target: backendTarget, changeOrigin: true },
"/healthz": { target: backendTarget, changeOrigin: true },
},
},
});