blob: d7a90b4d4e60e36a9e2effb22f5ba458c7a74327 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<!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", {
method: "POST",
})
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>
|