19 lines
699 B
Text
19 lines
699 B
Text
|
|
---
|
||
|
|
// Static page; the fetch runs client-side, same-origin, against the PHP API.
|
||
|
|
// A quick way to confirm the /api backend is wired up on a deployed site.
|
||
|
|
---
|
||
|
|
|
||
|
|
<html lang="en">
|
||
|
|
<head><meta charset="utf-8" /><title>API health test</title></head>
|
||
|
|
<body style="font-family: system-ui; padding: 2rem;">
|
||
|
|
<h1>SeedProject /api health</h1>
|
||
|
|
<pre id="out">loading…</pre>
|
||
|
|
<script>
|
||
|
|
fetch("/api/health", { credentials: "same-origin" })
|
||
|
|
.then((r) => r.json())
|
||
|
|
.then((j) => { document.getElementById("out").textContent = JSON.stringify(j, null, 2); })
|
||
|
|
.catch((e) => { document.getElementById("out").textContent = "ERROR: " + e; });
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|