Minifix
This commit is contained in:
parent
39d2bbe0b3
commit
01a5d21e69
@ -15,10 +15,12 @@ const root = ReactDOM.createRoot(
|
|||||||
const wsUrl = () => {
|
const wsUrl = () => {
|
||||||
const protocol = "ws" // window.location.protocol;
|
const protocol = "ws" // window.location.protocol;
|
||||||
const host = window.location.host;
|
const host = window.location.host;
|
||||||
|
const wsUrl = `ws://${host}/ws`;
|
||||||
|
console.log("WsUrl", wsUrl)
|
||||||
if (window.location.href.startsWith("http://localhost:3000")) {
|
if (window.location.href.startsWith("http://localhost:3000")) {
|
||||||
return "ws://localhost:8080/ws";
|
return "ws://localhost:8080/ws";
|
||||||
} else {
|
} else {
|
||||||
return `${protocol}//${host}/ws`;
|
return wsUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
root.render(
|
root.render(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user