diff --git a/backend/index.js b/backend/index.js index 2843036..81c1fa0 100644 --- a/backend/index.js +++ b/backend/index.js @@ -34,8 +34,10 @@ const axiosInstance = axios.create({ const redeployingStacks = {}; const server = http.createServer(app); -const io = new Server(server, { cors: { origin: "*" } }); - +const io = new Server(server, { + path: "/socket.io", + cors: { origin: "*" } +}); io.on("connection", (socket) => { console.log(`🔌 [Socket] Client verbunden: ${socket.id}`); }); diff --git a/frontend/src/Stacks.jsx b/frontend/src/Stacks.jsx index 00b9ac5..a7a43b8 100644 --- a/frontend/src/Stacks.jsx +++ b/frontend/src/Stacks.jsx @@ -8,7 +8,10 @@ export default function Stacks() { const [error, setError] = useState(""); useEffect(() => { - const socket = io("/", { transports: ["websocket"] }); +const socket = io("/", { + path: "/socket.io", + transports: ["websocket"] +}); console.log("🔌 Socket connected"); socket.on("redeployStatus", async ({ stackId, status }) => {