Worker API

Pages and JSON from the same Worker.

This demo passes a tiny Web Standards API object into the Native Fragments Cloudflare adapter. No Hono, no build step, no router dependency.

Cloudflare WorkersRuntime
2Endpoints
node:testUnit tests

Endpoints

Native fetch handlers.

<tr> <td><code>GET</code></td> <td><a href="/api/health" data-nativefragments-reload><code>/api/health</code></a></td> <td>Liveness check with no framework router dependency.</td> </tr><tr> <td><code>GET</code></td> <td><a href="/api/summary" data-nativefragments-reload><code>/api/summary</code></a></td> <td>JSON payload sourced from the same model as the HTML page.</td> </tr>
MethodPathPurpose