配置后端对接
This commit is contained in:
@@ -38,12 +38,17 @@ export default defineConfig({
|
||||
// 开发服务器配置
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
port: 3000,
|
||||
port: 5173, // Frontend port, different from backend
|
||||
strictPort: true,
|
||||
// API代理配置
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://localhost:3000",
|
||||
target: "http://localhost:2025", // Backend server
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path,
|
||||
},
|
||||
"/health": {
|
||||
target: "http://localhost:2025",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user