From 75fa07b213f9dc1e974614ae5f1c0cfbdbd35a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Paul?= Date: Sun, 3 Mar 2019 22:41:03 +0100 Subject: Introducing wsPath to update path for local installation --- client/client.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/client.js b/client/client.js index bd3d036..380318e 100644 --- a/client/client.js +++ b/client/client.js @@ -74,7 +74,12 @@ function join(channel) { } else { // for local installs var protocol = location.protocol === 'https:' ? 'wss:' : 'ws:' - ws = new WebSocket(protocol + '//' + document.domain + ':6060'); + // if you changed the port during the server config, change 'wsPath' + // to the new port (example: ':8080') + // if you are reverse proxying, change 'wsPath' to the new location + // (example: '/chat-ws') + var wsPath = ':6060'; + ws = new WebSocket(protocol + '//' + document.domain + wsPath); } var wasConnected = false; -- cgit v1.2.1