aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorstuebinm2021-02-19 00:23:51 +0100
committerstuebinm2021-02-19 00:23:51 +0100
commit56ef5217cc03408b8d2b09809880e2cfda7a5855 (patch)
tree2809161fad1994e98780451b118891a5885d6ad3 /index.html
Simple Slide-changing client
Everything works, EXCEPT: - choosing slidesets - choosing rooms - choosing the number of slides at runtime.
Diffstat (limited to 'index.html')
-rw-r--r--index.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..32c90e2
--- /dev/null
+++ b/index.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>Main</title>
+ <script src="app.js"></script>
+ <link rel="stylesheet" type="text/css" href="document.css" />
+</head>
+
+<body>
+ <div id="elm"></div>
+ <script>
+ var app = Elm.Main.init({
+ node: document.getElementById('elm')
+ });
+
+ let ws = new WebSocket("ws://localhost:9160")
+
+ ws.onopen = () => ws.send ("{\"room\":\"testroom\"}");
+
+ ws.onmessage = function(msg) {
+ console.log(msg.data)
+ app.ports.recvPort.send(msg.data)
+ }
+
+ app.ports.sendPort.subscribe(function(msg) {
+ ws.send(msg)
+ })
+ </script>
+</body>
+</html>