Skip to main content
Redop is runtime-agnostic. Define the server once, then choose how to host it:
  • Bun: .listen() starts a long-running HTTP server (default local DX)
  • Cloudflare / Vercel / Node: app.handler() plus a thin adapter

app.handler(opts?)

Returns a Web-standard fetch function:
HandlerOptions accepts the HTTP knobs from ListenOptions without bind fields: path, health, cors, debug, sessionTimeout, listCache, maxBodySize.

Package exports

Compat aliases: toCloudflare, toVercel, toVercelEdge, toNodeListener, toNodeHandler, toNodeFetch.

After-response scheduling

Capability matrix

Examples

On Cloudflare / Vercel, import Redop from the adapter entry (@redopjs/redop/cloudflare or @redopjs/redop/vercel) so the worker bundle does not pull the Bun .listen() path.