Skip to main content
Home

A tiny http routing library

This package works with Deno, BunIt is unknown whether this package works with Cloudflare Workers, Node.js, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
This package works with Bun
It is unknown whether this package works with Browsers
JSR Score
100%
Published
9 months ago (0.2.1)

TinyRoute

JSR

A tiny http routing library

Example

With Deno

import { Router, type TinyRequest } from "@matteac/tinyroute";

const router = new Router();

router.get("/", (_req) => new Response("Hello, World!"));
router.get("/{param}", (request: TinyRequest) => new Response(`GET /{param} where param = ${req.params.param}`))

Deno.serve(router.handler());
// or
Bun.serve({
    fetch: router.handler(),
});

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@matteac/tinyroute

Import symbol

import * as tinyroute from "@matteac/tinyroute";
or

Import directly with a jsr specifier

import * as tinyroute from "jsr:@matteac/tinyroute";

Add Package

pnpm i jsr:@matteac/tinyroute
or (using pnpm 10.8 or older)
pnpm dlx jsr add @matteac/tinyroute

Import symbol

import * as tinyroute from "@matteac/tinyroute";

Add Package

yarn add jsr:@matteac/tinyroute
or (using Yarn 4.8 or older)
yarn dlx jsr add @matteac/tinyroute

Import symbol

import * as tinyroute from "@matteac/tinyroute";

Add Package

vlt install jsr:@matteac/tinyroute

Import symbol

import * as tinyroute from "@matteac/tinyroute";

Add Package

npx jsr add @matteac/tinyroute

Import symbol

import * as tinyroute from "@matteac/tinyroute";

Add Package

bunx jsr add @matteac/tinyroute

Import symbol

import * as tinyroute from "@matteac/tinyroute";