Initial commit: CarrotAssistant admin console (React + Vite + TS)
This commit is contained in:
20
vite.config.ts
Normal file
20
vite.config.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
// The admin SPA talks to two backend route groups:
|
||||
// /admin/* — operator console APIs (login, apps, skills, ...)
|
||||
// /api/* — end-user Chat API (used by the skill test panel)
|
||||
// During local dev both are proxied to the Go server on :8080. In the
|
||||
// docker-compose deployment nginx serves the built assets and proxies the
|
||||
// same prefixes to the backend container.
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
'/admin': { target: 'http://localhost:8080', changeOrigin: true },
|
||||
'/api': { target: 'http://localhost:8080', changeOrigin: true },
|
||||
'/healthz': { target: 'http://localhost:8080', changeOrigin: true },
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user