Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.22 KB

README.md

File metadata and controls

49 lines (35 loc) · 1.22 KB

Rutt

Rutt is a tiny http router designed for use with deno and deno deploy. It is written in about 200 lines of code and is pretty fast, using an extended type of the web-standard URLPatterns to provide fast and easy route matching.

import { router } from "jsr:@denosaurs/rutt";

await Deno.serve(
  router({
    "/": (_req) => new Response("Hello world!", { status: 200 }),
  }),
).finished;

Usage with deno serve

import { router } from "jsr:@denosaurs/rutt";

export default {
  fetch: router({
    "/hello/:name": (_req, _, { name }) =>
      new Response(`Hello ${name}`, { status: 200 }),
  }),
};

Projects using rutt

Maintainers

Contribution

Pull request, issues and feedback are very welcome. Code style is formatted with deno fmt and commit messages are done following Conventional Commits spec.

Licence

Copyright 2022-2024, the denosaurs team. All rights reserved. MIT license.