Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion websocket-chat/src/webroot/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define(
"MessageList"
],
function(MessageList) {
var ws = new WebSocket("ws://localhost:8080/entry");
var ws = new WebSocket("ws" + (window.location.protocol==="https:"?"s":"") + "://"+ window.location.hostname + (window.location.port?":"+window.location.port:"") + "/entry");
var list = new MessageList(ws);
ko.applyBindings(list);
}
Expand Down