该介绍目前仅提供英文版本。
Overview
Cloudflare Workers Router is a super-lightweight router (1.0 KB gzipped) with middleware support and zero dependencies. The author built it to create a full API on Workers after finding no router that fit.
Features
- Zero dependencies and fully written in TypeScript
- Built around middleware
- Debug mode, plus CORS and bearer-token helpers
- Lets you read the request body multiple times
Install
npm install @tsndr/cloudflare-worker-router
Upgrading from v2? The repository includes a migration guide.