Getting Started
Prerequisites
- Bun >= 1.3
- A Cloudflare account
Create a project
bash
bunx create-b3-cf-appFollow the prompts:
- Project directory — where to scaffold (e.g.
my-app) - Description — optional project description
- bun install — whether to install dependencies immediately
- git init — whether to initialize a git repository
Start developing
bash
cd my-app
# Terminal 1: Hono API worker (Cloudflare dev)
bun run cf:dev
# Terminal 2: Vite dev server (proxies /api → worker)
bun run --filter @repo/web dev
# Or both at once:
bun run devOpen the Vite dev server URL (default http://localhost:5173). The home page calls /api/rpc/hello through the typed Hono RPC client.
Deploy
bash
bun run cf:deployThis builds the SPA (bun run --filter @repo/web build) and deploys the Worker with assets to Cloudflare.