Use relative link for ws on test page
This commit is contained in:
parent
d27883bc97
commit
7a7a4b7fce
@ -55,7 +55,7 @@ fn index() -> Html<&'static str> {
|
||||
sendForm.hidden = false;
|
||||
msgsArea.hidden = false;
|
||||
msgInput.focus();
|
||||
ws = new WebSocket("ws://localhost:2000/api/ws");
|
||||
ws = new WebSocket("ws://" + window.location.host + "/api/ws");
|
||||
ws.onmessage = function(event) {
|
||||
msgsArea.value += event.data + "\r\n";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user