Worker API
Native Fragments reference
API Reference · stable
One Worker. Pages and JSON.
A tiny Web Standards fetch handler serves server-rendered HTML and
typed JSON from the same model — no Hono and no second router dependency.
Every endpoint below returns live data from site/model.js.
Endpoints
Base URL https://worker-api.nativefragments.org
| Method | Path | Description |
|---|---|---|
| GET |
/api/health
|
Liveness check with no framework router dependency. |
| GET |
/api/summary
|
JSON payload sourced from the same model as the HTML page. |
Same model, two surfaces
The endpoint count, runtime, and dependency list on this page are read
from the identical export that powers /api/summary. Change the
model once and both the HTML and the JSON stay in sync.