Skip to main content

@fartlabs/rt@0.0.2

Minimal HTTP router library based on the URLPattern API.

Works with
It is unknown whether this package works with Bun
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 Browsers
JSR Score
100%
Published
2 weeks ago
deno add @fartlabs/rt
import * as mod from "@fartlabs/rt";
npx jsr add @fartlabs/rt
import * as mod from "@fartlabs/rt";
yarn dlx jsr add @fartlabs/rt
import * as mod from "@fartlabs/rt";
pnpm dlx jsr add @fartlabs/rt
import * as mod from "@fartlabs/rt";
bunx jsr add @fartlabs/rt
import * as mod from "@fartlabs/rt";

@fartlabs/rt

GitHub Actions

Minimal HTTP router library based on the URLPattern API.

Usage

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

const router = createRouter()
  .get("/", () => {
    return 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 @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