Standalone Apps
Webroutes are very versatile, and can be used as standalone apps. Here we cover some tips for getting webroute apps up and running with various runtimes.
Prerequisites
The below assumes you have some root handler for requests, which may or may not perform routing (it's up to you).
For more detailed advice on how to implement routing, please visit the Routing docs.
Node
While Node has supported the web standard Request
and Response
classes from v21, it does not provide a standard way to access an incoming HTTP Request
.
Until node provides a built-in WinterCG-compliant server, one should use @hono/node-server
which converts the traditional node Request/Responses to the web-standard counterpart, on the fly.
Bun
Deno
Cloudflare Workers
The workerd
runtime that Cloudflare Workers utilise expects a default export with a fetch
property.