summaryrefslogtreecommitdiff
path: root/server/web
diff options
context:
space:
mode:
Diffstat (limited to 'server/web')
-rw-r--r--server/web/index.gohtml24
1 files changed, 24 insertions, 0 deletions
diff --git a/server/web/index.gohtml b/server/web/index.gohtml
new file mode 100644
index 0000000..bf60372
--- /dev/null
+++ b/server/web/index.gohtml
@@ -0,0 +1,24 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport"
+ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>Document</title>
+</head>
+<body>
+
+<script>
+ const start = async () => {
+ const game = await fetch("/api/game/create")
+ const gameId = await game.text()
+ const connection = new WebSocket(`/api/game/${gameId}/connect`)
+ connection.addEventListener("message", (ev) => {
+ console.debug(JSON.parse(ev.data))
+ })
+ }
+ start()
+</script>
+</body>
+</html> \ No newline at end of file