Skip to content

Commit 8e77094

Browse files
authored
initial commit
1 parent 24db153 commit 8e77094

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

frontend/app.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
async function loadStatus() {
2+
const res = await fetch("http://localhost:3000/api/status");
3+
const services = await res.json();
4+
5+
const root = document.getElementById("services");
6+
root.innerHTML = "";
7+
8+
services.forEach(s => {
9+
const div = document.createElement("div");
10+
div.className = `service ${s.status}`;
11+
div.textContent = `${s.name}: ${s.status.toUpperCase()}`;
12+
root.appendChild(div);
13+
});
14+
}
15+
16+
setInterval(loadStatus, 5000);
17+
loadStatus();

0 commit comments

Comments
 (0)