This commit is contained in:
2025-08-20 22:02:42 +08:00
parent b40bb84468
commit 1a80726cd4
22 changed files with 1462 additions and 14993 deletions

30
frontend/vite.config.ts Normal file
View File

@ -0,0 +1,30 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
port: 3001,
host: '0.0.0.0',
proxy: {
'/api': {
target: 'http://127.0.0.1:8080',
changeOrigin: true,
secure: false,
configure: (proxy, options) => {
proxy.on('proxyReq', (proxyReq, req, res) => {
console.log('Proxying request:', req.method, req.url);
console.log('Headers:', req.headers);
});
proxy.on('proxyRes', (proxyRes, req, res) => {
console.log('Proxy response:', proxyRes.statusCode, 'for', req.url);
});
proxy.on('error', (err, req, res) => {
console.log('Proxy error:', err.message);
});
}
}
}
}
})