How-to guides
Deploy to Cloudflare
Production deploy via Alchemy, with a wrangler fallback.
Preferred: Alchemy
bun run deployThis builds with CLOUDFLARE_DEPLOY=1 (nitro cloudflare_module preset) and
runs alchemy deploy. The stack in alchemy.run.ts is a single
Cloudflare.Workers.Worker:
main: .output/server/index.mjswithbundle: false— nitro's output is already a Worker-ready ESM bundle with sibling chunks.assets: { directory: .output/public }— prerendered HTML and hashed client assets, bound asASSETS.nodejs_compatcompatibility flag — nitro's runtime polyfillsnode:*imports.
Fallback: wrangler
bun run deploy:wranglerNitro writes .output/server/wrangler.json during the Cloudflare build; this
just deploys it.
Verify
After deploy, check that a prerendered page, /api/search, and a .md page
URL all respond correctly.