跳到正文

Cloudflare Workers Router

活跃
tsndr/cloudflare-worker-router

超轻量(gzip 后约 1 KB)、零依赖的 Cloudflare Workers 路由器,以中间件为核心,内置 CORS 和 Bearer 令牌辅助函数。

在 GitHub 查看
星标
260
Fork
28
关注
260
未关闭 Issue
1

该介绍目前仅提供英文版本。

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.

按共同分类和标签排序的同类开源项目。

全部 Web 框架项目 →