mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-06-11 20:10:59 +00:00
f3f4c67b36
Multi-agent AI gateway with WebSocket RPC, HTTP API, and messaging channel integrations. Go port of OpenClaw with multi-tenant PostgreSQL, per-user isolation, security hardening, and production observability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
1021 B
TypeScript
42 lines
1021 B
TypeScript
import { defineConfig, loadEnv } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import path from "path";
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), "");
|
|
const backendPort = env.VITE_BACKEND_PORT || "9600";
|
|
const backendHost = env.VITE_BACKEND_HOST || "localhost";
|
|
|
|
return {
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
"/ws": {
|
|
target: `http://${backendHost}:${backendPort}`,
|
|
ws: true,
|
|
changeOrigin: true,
|
|
},
|
|
"/v1": {
|
|
target: `http://${backendHost}:${backendPort}`,
|
|
changeOrigin: true,
|
|
},
|
|
"/health": {
|
|
target: `http://${backendHost}:${backendPort}`,
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "dist",
|
|
emptyOutDir: true,
|
|
},
|
|
};
|
|
});
|