From 4d50d541cbd8b464b18a3f5306ca78c7474ad5da Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Fri, 29 Sep 2017 13:33:21 +0200 Subject: Make port dependent on window location --- src/api/socket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/socket.js b/src/api/socket.js index b5bb9b37..549ed6a9 100644 --- a/src/api/socket.js +++ b/src/api/socket.js @@ -6,7 +6,7 @@ let requestIdCounter = 0; const callbacks = {}; export function setupSocketConnection(onConnect) { - socket = io.connect(window.location.protocol + "//" + window.location.hostname + ":8081"); + socket = io.connect(window.location.protocol + "//" + window.location.hostname + ":" + window.location.port); socket.on("connect", onConnect); socket.on("response", onSocketResponse); } -- cgit v1.2.3