Hono
Hono is a fast and lightweight web application framework, built on Web Standards.
Fetch handler
Section titled “Fetch handler”Hono is compatible out of the box with fetch handlers (like on Cloudflare, Netlify, Vercel or Node):
import type { ExportedHandler } from "@vite-deploy/netlify";import { Hono } from "hono";
const app = new Hono();
// ...
export default app satisfies ExportedHandler;Node handler
Section titled “Node handler”If you want to use Hono with a Node handler, you will need to convert the fetch handler to a Node handler. We recommend srvx:
import mod from "./handler";import { toNodeHandler } from "srvx/node";import * as http from "node:http";import sirv from "sirv";import { fileURLToPath } from "node:url";
const server = http.createServer((req, res) => sirv(fileURLToPath(new URL("../client/", import.meta.url)), { dev: true })( req, res, () => { // @ts-expect-error toNodeHandler(mod.fetch)(req, res); }, ),);
server.listen(3000, () => { console.log("Ready at http://localhost:3000");});