initial commit (backend) (pending TODOs, will amend)
This commit is contained in:
29
static/index.html
Normal file
29
static/index.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Test</title>
|
||||
<!-- <link href="css/style.css" rel="stylesheet"> -->
|
||||
<script>
|
||||
window.onload = () => {
|
||||
let lb = document.getElementById("leaderboard")
|
||||
lb.textContent = ""
|
||||
|
||||
const sock = new WebSocket("/api-ws")
|
||||
|
||||
sock.addEventListener("open", event => {
|
||||
// if loader, remove here
|
||||
})
|
||||
|
||||
sock.addEventListener("message", event => {
|
||||
lb.textContent = event.data
|
||||
})
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>leaderboard:</h1>
|
||||
<pre id="leaderboard">Please enable JavaScript</pre>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user