Tutorials
First deploy
Build for Cloudflare Workers and deploy with Alchemy.
This tutorial deploys the docs site to Cloudflare Workers.
Prerequisites
- Cloudflare credentials configured for Alchemy
(same setup as the
productrepo'sinfra:deploy).
Steps
-
Build the Worker bundle and prerendered assets:
bun run build:cfThis sets
CLOUDFLARE_DEPLOY=1, which selects nitro'scloudflare_modulepreset and writes.output/server/index.mjsplus the static assets in.output/public. -
Deploy:
bun run deployalchemy.run.tsuploads the nitro server bundle (bundle: false) and serves.output/publicthrough the Worker assets binding.
Fallback
If Alchemy is unavailable, nitro also emits a wrangler config:
bun run deploy:wranglerwhich runs wrangler deploy --config .output/server/wrangler.json.