Skip to main content

@fartlabs/rt@0.0.10
Built and signed on GitHub Actions

Minimal HTTP router library based on the URLPattern API.

This package works with DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun, 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
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
76%
Published
3 weeks ago (0.0.10)

@fartlabs/rt

GitHub Actions

Minimal HTTP router library based on the URLPattern API.

Usage

import { Router } from "@fartlabs/rt";

const router = new Router()
  .get("/", () => new Response("Hello, World!"))
  .default(() => new Response("Not found", { status: 404 }));

Deno.serve((request) => router.fetch(request));

Deno

1. Install Deno.

2. Start a new Deno project.

deno init

3. Add rt as a project dependency.

deno add jsr:@fartlabs/rt

Contribute

We appreciate your help!

Style

Run deno fmt to format the code.

Run deno lint to lint the code.


Developed with ❤️ @FartLabs

Built and signed on
GitHub Actions
View transparency log

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:@fartlabs/rt

Import symbol

import * as rt from "@fartlabs/rt";
or

Import directly with a jsr specifier

import * as rt from "jsr:@fartlabs/rt";

Add Package

pnpm i jsr:@fartlabs/rt
or (using pnpm 10.8 or older)
pnpm dlx jsr add @fartlabs/rt

Import symbol

import * as rt from "@fartlabs/rt";

Add Package

yarn add jsr:@fartlabs/rt
or (using Yarn 4.8 or older)
yarn dlx jsr add @fartlabs/rt

Import symbol

import * as rt from "@fartlabs/rt";

Add Package

npx jsr add @fartlabs/rt

Import symbol

import * as rt from "@fartlabs/rt";

Add Package

bunx jsr add @fartlabs/rt

Import symbol

import * as rt from "@fartlabs/rt";