7 lines
281 B
JavaScript
7 lines
281 B
JavaScript
// Living example script: tiny health badge, no framework needed.
|
|||
|
|
fetch("/health").then(function (r) { return r.json(); }).then(function (j) {
|
||
|
|
var el = document.createElement("p");
|
||
|
|
el.textContent = "health: " + j.status + " tls: " + j.tls;
|
||
|
|
document.body.appendChild(el);
|
||
|
|
});
|