Quick Start
Get a BurgerAPI app running in under a minute.
Full install options (standalone executable, manual setup): Installation.
Prerequisites
- Bun: BurgerAPI is built for Bun. Install it from bun.sh. Bun runs the CLI and local dev server regardless of where you deploy. See Deploy anywhere below.
Steps
This is the short version. For every install method, see Installation.
-
Install the CLI (if you have Bun), or run it with bunx without installing:
bun add -g @burger-api/cli# no install needed: bunx @burger-api/cli <command> -
Create a project, enter it, and start the dev server:
burger-api create my-apicd my-apibun run dev -
Open http://localhost:4000/api for the starter route and http://localhost:4000/docs for the API docs.
Language choice
BurgerAPI treats TypeScript and JavaScript as first-class languages. The
scaffold defaults to TypeScript; pass --lang js for a JavaScript project
(jsconfig.json with checkJs, .js / .mjs route files, JSDoc types):
burger-api create my-api --lang js
See JavaScript for details.
Deploy anywhere
bun run dev above is local development. When you're ready to ship, burger-api build --target=<platform> builds for the platform you're deploying to: Bun (default), Node.js, Cloudflare Workers, Deno, or Vercel:
burger-api build src/index.ts --target=cloudflare
wrangler dev # boots the generated build locally, then `wrangler deploy`
See Deployment for each target and Compatibility for what works where (WebSocket, for example, works on every target except Vercel).
Next steps
- Installation: Full install options (standalone executable, manual setup).
- CLI Tool: All CLI commands (create, add, list, dev, build, start).
- Key Concepts: Routing, hooks, plugins, validation.
- JavaScript: JavaScript with JSDoc types.
- Deployment: Bun, Node.js, Cloudflare Workers, Deno, Vercel.