Overview
Webroute makes building fully-fledged standalone HTTP routes easy. The end result can be run anywhere web standard Request
and Response
are supported, including without any router.
Conceptually, route
moves middleware and I/O validation out of the router and into the route itself. This enables powerful composition and each route becomes incredibly portable.
Introduction
The utility of this approach becomes clear when used with nextjs
or other filesystem routers, for example:
And you could use this exact same route handler with Hono too.
By packaging the validation and middleware (and more) with the route itself, it becomes incredibly portable, and you'll find your applications actually become simpler too. Learn more about what webroute includes in Features or get up and running via the Quick Start.