Verify Deployment
After Modal and Cloudflare are up, run one end-to-end smoke test through the public Worker. This is the quickest way to confirm your setup works.
1. Check Worker Health
Production:
curl https://<your-worker>.workers.dev/health
Local development:
curl http://localhost:8787/health
2. Generate a Session Token
Use the canonical helper. Do not hand-build token signatures.
export SESSION_SIGNING_SECRET="<same-value-you-uploaded-to-cloudflare>"
TOKEN="$(node edge-control-plane/scripts/generate-session-token.js \
--user-id deploy-check-user \
--tenant-id deploy-check-tenant \
--session-id deploy-check-session \
--ttl-seconds 3600 \
--secret "$SESSION_SIGNING_SECRET")"
3. Send One Query
Production:
curl -X POST https://<your-worker>.workers.dev/query \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"question":"What is 2 + 2?","session_id":"deploy-check-session"}'
Local development:
curl -X POST http://localhost:8787/query \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"question":"What is 2 + 2?","session_id":"deploy-check-session"}'
What Success Looks Like
/healthreturns200/queryreturnsok: true- the response includes the same
session_idyou used
What To Do Next
- Use API Usage Guide for the supported routes
- Use Worker API Reference for low-level API details
- Use How Rafiki Fits Together if you want the system map