apps/reverse-proxy/src– Cloudflare Worker implementation powered by Hono.apps/reverse-proxy/tests– Vitest suite targeting the Worker.apps/reverse-proxy/wrangler.toml– Worker deployment settings.apps/reverse-proxy/.dev.vars– Local-only variables (ignored by git); copy from.dev.vars.example.
Root package.json manages the Bun workspace ("workspaces": ["apps/*"]) and centralizes dependencies. See the Bun workspaces guide for more details on the layout.citeturn0search1
- Copy
apps/reverse-proxy/.dev.vars.exampletoapps/reverse-proxy/.dev.vars, add required bindings (for exampleCLOUDFLARE_ACCOUNT_ID), and keep.dev.varsuntracked. API_DOMAINin the vars file determines the custom subdomain (underkkk4oru.com) where the API is served.- Set
LOG_REQUESTSto1(ortrue) in the vars file when you want console logging from the proxy middleware. - The Worker schedules cache warm operations via
CACHE_WARM_QUEUE; ensure the queue exists in your Cloudflare account after runningwrangler deploy. - For production, define plaintext vars under
[vars]inapps/reverse-proxy/wrangler.tomlor set them viawrangler variables put/ the Cloudflare dashboard, and store sensitive values withwrangler secret put. account_idis supplied through environment variables (for exampleCLOUDFLARE_ACCOUNT_ID) orwrangler login, so it remains out ofwrangler.toml.