From e0341e65cd7d52918987c5de8450e5ddc8942dab Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Mon, 30 May 2016 02:08:33 +0200 Subject: [PATCH] Use window.location.host instead of 127.0.0.1 (#178) See #176 --- docs/getting-started.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting-started.rst b/docs/getting-started.rst index 2b24beb..efd51ac 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -134,7 +134,7 @@ need to change the socket address if you're using a development VM or similar):: // Note that the path doesn't matter for routing; any WebSocket // connection gets bumped over to WebSocket consumers - socket = new WebSocket("ws://127.0.0.1:8000/chat/"); + socket = new WebSocket("ws://" + window.location.host + "/chat/"); socket.onmessage = function(e) { alert(e.data); } @@ -228,7 +228,7 @@ code in the developer console as before:: // Note that the path doesn't matter right now; any WebSocket // connection gets bumped over to WebSocket consumers - socket = new WebSocket("ws://127.0.0.1:8000/chat/"); + socket = new WebSocket("ws://" + window.location.host + "/chat/"); socket.onmessage = function(e) { alert(e.data); }