
Hono Has a Free API: The Ultrafast Web Framework for the Edge
Why Hono Hono is a lightweight web framework built for edge runtimes — Cloudflare Workers, Deno, Bun, Vercel Edge, AWS Lambda. It runs everywhere with the same code and is blazing fast (~12K req/sec on Workers). Install npm create hono@latest my-app cd my-app npm install npm run dev Basic App import { Hono } from ' hono ' ; const app = new Hono (); app . get ( ' / ' , ( c ) => c . text ( ' Hello Hono! ' )); app . get ( ' /api/users/:id ' , async ( c ) => { const id = c . req . param ( ' id ' ); const user = await getUser ( id ); return c . json ( user ); }); app . post ( ' /api/users ' , async ( c ) => { const body = await c . req . json (); const user = await createUser ( body ); return c . json ( user , 201 ); }); export default app ; Middleware import { Hono } from ' hono ' ; import { cors } from ' hono/cors ' ; import { logger } from ' hono/logger ' ; import { bearerAuth } from ' hono/bearer-auth ' ; import { zValidator } from ' @hono/zod-validator ' ; import { z } from ' zod ' ; c
Continue reading on Dev.to Webdev
Opens in a new tab

