This commit is contained in:
root
2025-09-25 09:18:19 +00:00
parent 55a9c3327f
commit d49605001e
5 changed files with 139 additions and 167 deletions
+14 -10
View File
@@ -1,17 +1,21 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: {
host: true,
port: 5173,
host: true, // Hört auf allen Netzwerk-Interfaces, kein localhost notwendig
port: 5173, // optional, Standardport für Vite
proxy: {
"/api": {
target: "http://127.0.0.1:4001", // dein Backend
changeOrigin: true,
'/api': {
target: 'http://127.0.0.1:4001', // Backend lokal auf Port 4001
changeOrigin: true
},
},
allowedHosts: "all",
},
'/socket.io': {
target: 'http://127.0.0.1:4001', // WebSocket-Verbindungen über Proxy weiterleiten
ws: true,
changeOrigin: true
}
}
}
});