0.0.4
[henge/kiak.git] / old / remote-server.html
diff --git a/old/remote-server.html b/old/remote-server.html
new file mode 100644 (file)
index 0000000..2b65a20
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<html>
+  <head>
+  <title>Strapp.io Host</title>
+  <script type="text/javascript">
+  document.body = document.createElement('body')
+  const strappDiv = document.createElement('div')
+  document.body.appendChild(strappDiv)
+  strappDiv.innerHTML = "Connection Dead"
+  if ("WebSocket" in window) {
+    const wsock = new WebSocket("wss://$HOST:$PORT")
+    wsock.onopen = () => {
+      wsock.send("Test message")
+      strappDiv.innerHTML = "Sent test"
+    }
+    wsock.onmessage = (evt) => {
+      strappDiv.innerHTML = "Got Response <br/>" + evt.data
+    }
+  } else {
+    strappDiv.innerHTML = "Your browser does not support Strapp"
+  }
+  </script>
+  </head>
+</html>