mirror of
https://github.com/danbulant/slightlyComplicatedTicTacToe
synced 2026-07-05 19:20:50 +00:00
use wss on deploy
This commit is contained in:
parent
559f2a90e9
commit
477e7d370e
1 changed files with 2 additions and 2 deletions
|
|
@ -155,8 +155,8 @@ export class WebsocketConnection extends EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
connect() {
|
connect() {
|
||||||
const host = location.hostname.includes("danbulant.eu") ? "multidie.danbulant.cloud" : location.hostname + ":8080";
|
const host = location.hostname.includes("danbulant.eu") ? "wss://multidie.danbulant.cloud" : "ws://" + location.hostname + ":8080";
|
||||||
this.ws = new WebSocket("ws://" + host + "/?name=" + encodeURIComponent(this.name));
|
this.ws = new WebSocket(host + "/?name=" + encodeURIComponent(this.name));
|
||||||
this.ws.addEventListener("open", (e) => {
|
this.ws.addEventListener("open", (e) => {
|
||||||
console.log("WS ready");
|
console.log("WS ready");
|
||||||
this.refreshList();
|
this.refreshList();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue