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

  1. IntroductionMeet Hono and the shape of this book.
  2. Getting StartedInstall Hono and run your first local server.
  3. RoutingMatch URLs, read parameters, and return responses.
  4. MiddlewareCompose behavior around routes.
  5. JSX and HTML RenderingRender full HTML pages with Hono JSX.
  6. Request ContextRead request data from Hono's context object.
  7. Response PatternsReturn text, JSON, HTML, redirects, headers, and status codes.
  8. Handling Body DataRead JSON, text, and form bodies from incoming requests.
  9. ValidationValidate incoming data before handlers use it.
  10. Error HandlingHandle missing routes and unexpected failures.
  11. Cookies and HeadersWork with request metadata and small browser state.
  12. Built-in MiddlewareAdd common behavior with Hono's included middleware.
  13. Organizing RoutesSplit Hono apps into smaller route groups.
  14. Testing Hono AppsTest routes with app.request and normal Response assertions.
  15. Type-safe ClientsShare Hono route types with client code.
  16. DeploymentBuild and deploy the book to Cloudflare Pages.