From 5d2d4caebdabf76977c92dadf4810c0d637dc6fd Mon Sep 17 00:00:00 2001 From: Anteneh Denbel <112484153+Antenehden@users.noreply.github.com> Date: Sun, 11 Aug 2024 20:33:38 -0500 Subject: [PATCH] Update index.html --- html/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/index.html b/html/index.html index 62d3c0c..ebcbcef 100644 --- a/html/index.html +++ b/html/index.html @@ -175,7 +175,8 @@

Scores

const startGameButton = document.getElementById('startGameButton'); // Start button reference function connectWebSocket() { - socket = new WebSocket('ws://localhost:9105'); + url = "ws://" + window.location.hostname +":"+ (parseInt(location.port) + 100); + socket = new WebSocket(url); socket.onopen = function () { console.log('WebSocket connection established'); };