X-Git-Url: https://git.kengrimes.com/?p=henge%2Fkiak.git;a=blobdiff_plain;f=host.js;h=939c8f285971e8fc0c8e0ea56fe627742e47a0be;hp=2700506af93a3f0f84b9ddc177bab3419bdcc5f7;hb=8a4003e360fdd0f28553d8140a5ba567891a25f5;hpb=37b12d7d745749e7fb0091afb6c4f9747e1bb51b diff --git a/host.js b/host.js index 2700506..939c8f2 100644 --- a/host.js +++ b/host.js @@ -2,9 +2,9 @@ const body = document.createElement('body') const root = document.createElement('div') document.title = "Strapp.io Host" if ("WebSocket" in window) { - const wsock = new WebSocket("wss://" + _strapp_host + ":" + _strapp_port) + const wsock = new WebSocket("wss://" + window.location.host + ":" + _strapp_port) wsock.onopen = () => { - console.log("Strapped to wss://" + _strapp_host + ":" + _strapp_port) + console.log("Strapped to wss://" + window.location.host + ":" + _strapp_port) } wsock.onmessage = (evt) => { console.log("Incoming connection from " + evt.data)