diff --git a/index.html b/index.html
index a3058a9..cc74695 100644
--- a/index.html
+++ b/index.html
@@ -28,7 +28,7 @@
Chat
chat.appendChild(line);
}
- var socket = new WebSocket('ws://127.0.0.1/chat');
+ var socket = new WebSocket('ws://' + window.location.hostname + '/chat');
socket.onopen = function() {
writeLine('connected');
@@ -44,4 +44,4 @@ Chat