This page registers a ServiceWorker at ./sw-worker.js and
mounts a tiny in-browser HTTP handler under ./api/. The SW
then intercepts same-origin fetch() calls matching that
prefix and routes them to the handler — no remote server involved.