feat: wire workspace CRUD UI to backend
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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 },
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user