Calling a Worker from Pages
This site calls the same Worker two different ways. Click a button to see what the response looks like.
1. Browser → Worker (direct)
Edit public/app.js and set WORKER_URL to
your deployed Worker URL (or http://localhost:8789
for local dev) before this works.
(no result yet)
2. Browser → Pages Function → Worker (service binding)
Goes through /api/via-binding. The Function calls the
Worker over a server-to-server binding, so no public URL is needed
and secrets stay on the server.
(no result yet)