cloudflare-worker-router icon indicating copy to clipboard operation
cloudflare-worker-router copied to clipboard

A super lightweight router (1.0K) with middleware support and ZERO dependencies for Cloudflare Workers.

Results 12 cloudflare-worker-router issues
Sort by recently updated
recently updated
newest added

I might be missing something obvious, but when trying to define a route handler in a separate file, it's not possible in Typescript at the moment as the types aren't...

Just wanted to say it's a nice little library you have here, very well written. Wondered if you've got any plans for allowing nested routes to be defined in different...

enhancement

Hello, I use workers as an image cdn and i'm trying to turn it from multiple workers into one with routing, but i can't seem to be able to send...

Currently when bundling this into a module worker using esbuild, the module including the default export gets wrapped again in `{default: /* original module */}`. Details why are explained here:...

I'm getting the error `Body has already been used. It can only be used once. Use tee() first if you need to read it twice.` Normally you'd use `req.clone` or...

I discovered that this router does not support nested route, so I added it to help us achieve composite routing. I also included example instructions.

The body field is mentioned in the documentation but I didn't see it neither in types nor in the implementation. I wonder how people are getting contents of a POST,...

While using req.json() to get the body the following error appears within wrangler: ![grafik](https://github.com/tsndr/cloudflare-worker-router/assets/5563452/d922f65c-9183-4fd3-a385-8776a78a22ff) Maybe you can help?

Is there a way to retrieve the origin? or the host/port?

Is the following doc correct? I assume the full lib should be installed (not -D)? Thx. > Getting started > Please follow Cloudflare's [Get started guide](https://developers.cloudflare.com/workers/get-started/guide/) to install wrangler. >...