@zebp/routy
v0.4.0
Published
A simple request router
Downloads
8
Readme
routy
A simple and extendable Router for Node, Deno, and Cloudflare Workers.
Example
import { WebRouter } from "@zebp/routy";
const router = new WebRouter().get(
"/greet/:name",
(_req, _data, ctx) => new Response(`Hello, ${ctx.params.name}!`)
);
const response = await router.route(
new Request("https://example.com/greet/user")
);