Genesis
This commit is contained in:
commit
2cf5d77e2a
5 changed files with 159 additions and 0 deletions
27
index.html
Normal file
27
index.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Pomodoro Timer</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Pomodoro Timer</h1>
|
||||
<div id="timer">Connecting to server...</div>
|
||||
|
||||
<script>
|
||||
var ws = new WebSocket("ws://localhost:8080/ws");
|
||||
|
||||
ws.onmessage = function (event) {
|
||||
document.getElementById("timer").innerText = event.data;
|
||||
};
|
||||
|
||||
ws.onclose = function () {
|
||||
document.getElementById("timer").innerText = "Connection closed.";
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue