mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
guh
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@
|
|||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>webui</title>
|
<title>webui</title>
|
||||||
<script type="module" crossorigin src="/assets/index-0y51eWnL.js"></script>
|
<script type="module" crossorigin src="/assets/index-CtTKxUTT.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-DoNH_msu.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DoNH_msu.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
+10
-9
@@ -1,12 +1,13 @@
|
|||||||
import { io } from "socket.io-client";
|
import { io } from 'socket.io-client';
|
||||||
|
|
||||||
console.log('socket.io client loaded')
|
const configuredUrl = import.meta.env.VITE_ROVERD_URL?.trim();
|
||||||
|
const serverUrl = configuredUrl && configuredUrl.length > 0 ? configuredUrl : undefined;
|
||||||
|
|
||||||
const serverUrl = import.meta.env.VITE_ROVERD_URL ?? "http://localhost:8080";
|
export const socket = io(serverUrl, {
|
||||||
export const socket = io({
|
transports: ['websocket'],
|
||||||
// export const socket = io(serverUrl, {
|
query: { role: 'user' },
|
||||||
transports: ["websocket"], // skip polling if your backend supports it
|
});
|
||||||
query: {
|
|
||||||
role: "user"
|
socket.on('connect_error', (error) => {
|
||||||
}
|
console.error('Socket connection error:', error.message);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user