From 50a49a1a4c4d531ed9416405c9718e8663c42690 Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Thu, 15 Jun 2017 16:17:15 -0700 Subject: [PATCH] Fix host of the web socket --- Ooui/Client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ooui/Client.js b/Ooui/Client.js index 3c9b433..82c532c 100644 --- a/Ooui/Client.js +++ b/Ooui/Client.js @@ -1,6 +1,6 @@ // Create WebSocket connection. -const socket = new WebSocket ("ws://localhost:8080" + rootElementPath, "ooui-1.0"); +const socket = new WebSocket ("ws://" + document.location.host + rootElementPath, "ooui-1.0"); console.log("Web socket created");