@zebp/routy
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

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")
);

Readme

Keywords

none

Package Sidebar

Install

npm i @zebp/routy

Weekly Downloads

50

Version

0.4.0

License

MIT

Unpacked Size

47.1 kB

Total Files

17

Last publish

Collaborators

  • zebp