A book built with Hono
Learn Hono by reading a Hono app.
Hono Book is a practical HTML book scaffold for teaching the Hono framework through server-rendered pages, Markdown chapters, and deployable Cloudflare Pages output.
Contents
Chapters
- IntroductionMeet Hono and the shape of this book.
- Getting StartedInstall Hono and run your first local server.
- RoutingMatch URLs, read parameters, and return responses.
- MiddlewareCompose behavior around routes.
- JSX and HTML RenderingRender full HTML pages with Hono JSX.
- Request ContextRead request data from Hono's context object.
- Response PatternsReturn text, JSON, HTML, redirects, headers, and status codes.
- Handling Body DataRead JSON, text, and form bodies from incoming requests.
- ValidationValidate incoming data before handlers use it.
- Error HandlingHandle missing routes and unexpected failures.
- Cookies and HeadersWork with request metadata and small browser state.
- Built-in MiddlewareAdd common behavior with Hono's included middleware.
- Organizing RoutesSplit Hono apps into smaller route groups.
- Testing Hono AppsTest routes with app.request and normal Response assertions.
- Type-safe ClientsShare Hono route types with client code.
- DeploymentBuild and deploy the book to Cloudflare Pages.