
Hono Has a Free Web Framework That Runs on Every Edge — Cloudflare, Vercel, Deno, Bun, AWS Lambda
The Edge Framework Problem Express doesn't run on Cloudflare Workers. Fastify doesn't run on Deno Deploy. Each runtime needs its own framework. Hono runs on every JavaScript runtime. Same code, 10+ deployment targets. Ultra-lightweight: 14KB. What Hono Gives You Simple, Express-Like API import { Hono } from ' hono ' ; const app = new Hono (); app . get ( ' / ' , ( c ) => c . text ( ' Hello Hono! ' )); app . get ( ' /api/users/:id ' , ( c ) => { const id = c . req . param ( ' id ' ); return c . json ({ id , name : ' John ' }); }); export default app ; Middleware import { cors } from ' hono/cors ' ; import { logger } from ' hono/logger ' ; import { bearerAuth } from ' hono/bearer-auth ' ; import { compress } from ' hono/compress ' ; app . use ( ' * ' , logger ()); app . use ( ' * ' , cors ()); app . use ( ' /api/* ' , bearerAuth ({ token : ' secret ' })); app . use ( ' * ' , compress ()); Validation (Zod Integration) import { zValidator } from ' @hono/zod-validator ' ; import { z } from
Continue reading on Dev.to Webdev
Opens in a new tab


