We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24db153 commit 8e77094Copy full SHA for 8e77094
1 file changed
frontend/app.js
@@ -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