29 lines
604 B
Plaintext

<!DOCTYPE html>
<html>
<head>
<title>Blab</title>
</head>
<body>
<h1>Hello, world!</h1>
<ul>
{% for object in objects %}
<li>{{ object.name }} @ {{ object.x }}, {{ object.y }}</li>
{% endfor %}
</ul>
<script>
ws = new WebSocket("ws://localhost:3030/state");
ws.onopen = function() {
console.log("Connected");
}
ws.onmessage = function(e) {
console.log("From Server:" + e.data);
};
</script>
</body>
</html>