diff options
Diffstat (limited to 'test-client')
| -rw-r--r-- | test-client/main.ts | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/test-client/main.ts b/test-client/main.ts index 20ec2a18..23bf4052 100644 --- a/test-client/main.ts +++ b/test-client/main.ts @@ -11,7 +11,10 @@ let ctx: CanvasRenderingContext2D;  let canvas: HTMLCanvasElement;  let ws: WebSocket;  document.addEventListener("DOMContentLoaded", () => { -    ws = new WebSocket(`${window.location.protocol.endsWith("s:") ? "wss" : "ws"}://${window.location.hostname}:27032/`) +    const ws_uri = window.location.protocol.endsWith("s:") +        ? `wss://game.${window.location.hostname}/` +        : `ws://${window.location.hostname}:27032/` +    ws = new WebSocket(ws_uri)      ws.onerror = console.error      ws.onmessage = m => {          packet(JSON.parse(m.data) as PacketC);  |