Routing framework for Cloudflare Workers built on itty-router with error handling, CORS, and class-based route handlers.
import { WorkerRouter, RouteHandler } from '@whi/cf-routing';class HealthHandler extends RouteHandler { async get() { return { status: 'healthy' }; }}const router = new WorkerRouter('my-worker') .defineRouteHandler('/health', HealthHandler) .build(); Copy
import { WorkerRouter, RouteHandler } from '@whi/cf-routing';class HealthHandler extends RouteHandler { async get() { return { status: 'healthy' }; }}const router = new WorkerRouter('my-worker') .defineRouteHandler('/health', HealthHandler) .build();
Routing framework for Cloudflare Workers built on itty-router with error handling, CORS, and class-based route handlers.
Example