()
| 160 | } |
| 161 | |
| 162 | async function assertHealthy() { |
| 163 | const health = await request("GET", "/api/health"); |
| 164 | if (health?.ok !== true) { |
| 165 | throw new Error("SimDeck health endpoint did not return ok=true"); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | async function request(method, path, body) { |
| 170 | const response = await fetch(`${serverUrl}${path}`, { |