talira

Web framework built on Web Standards

open sourceMITself-hostablefree

Hono ("flame" in Japanese) is a small, fast web framework for TypeScript and JavaScript built only on Web Standard APIs, so the same app runs on Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Netlify, AWS Lambda and Node.js. It has zero dependencies, a hono/tiny preset under 14 kB, and the RegExpRouter, which matches routes without linear loops. Built-in middleware covers CORS, JWT, basic and bearer auth, CSRF protection, compression, caching, secure headers and more, with helpers for JSX rendering, streaming, WebSockets and static site generation. Validators and its RPC client share types between server and client. It's similar to Express without a frontend, and is MIT licensed.

Problems it solves

  • an Express-style web framework that runs on Cloudflare Workers and other edge runtimes
  • run the same API code on Node.js, Bun, Deno and AWS Lambda without rewriting it
  • my web framework is too big for the bundle size limit of edge functions
  • build a small JSON API in TypeScript with typed routes and request validation
  • call my API from the frontend with types shared from the server routes
  • add CORS, JWT auth and rate-limited routes to a serverless API with ready-made middleware
  • render HTML with JSX on the server without React
  • put a proxy or routing layer in front of my backend at the CDN edge
  • a fast router for a high-traffic serverless API

Features

  • built on Web Standard Request and Response; zero dependencies
  • runs on Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Netlify, AWS Lambda, Lambda@Edge, Azure Functions and Node.js
  • RegExpRouter, SmartRouter, LinearRouter and PatternRouter
  • hono/tiny preset under 14 kB
  • built-in middleware: CORS, CSRF, JWT, JWK, basic and bearer auth, compress, cache, ETag, secure headers, body limit, timeout, logger
  • helpers for JSX, streaming, WebSockets, cookies, SSG and testing
  • validation middleware and an RPC client with types shared from routes
  • create-hono project scaffolder for each runtime
  • Hono CLI and docs for coding agents

Capabilities

Takes pluginsplan not known

Alternatives

The same job

These do what Hono does.

  1. NestJS A progressive Node.js framework for efficient, scalable backends
  2. Express Fast, unopinionated, minimalist web framework for Node.js
  3. Fastify Fast and low overhead web framework, for Node.js

Compare Hono with the top 3