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)