https://github.com/denosaurs/rutt
🛣️ A tiny and fast http request router designed for use with deno and deno deploy
https://github.com/denosaurs/rutt
deno deno-deploy deploy hacktoberfest router routing server serverless urlpattern
Last synced: about 1 month ago
JSON representation
🛣️ A tiny and fast http request router designed for use with deno and deno deploy
- Host: GitHub
- URL: https://github.com/denosaurs/rutt
- Owner: denosaurs
- License: mit
- Created: 2022-08-23T14:01:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-18T19:16:51.000Z (8 months ago)
- Last Synced: 2025-04-10T00:32:48.132Z (about 1 month ago)
- Topics: deno, deno-deploy, deploy, hacktoberfest, router, routing, server, serverless, urlpattern
- Language: TypeScript
- Homepage: https://deno.land/x/rutt
- Size: 15.6 KB
- Stars: 62
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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
[`URLPattern`s](https://developer.mozilla.org/en-US/docs/Web/API/URLPattern) to
provide fast and easy route matching.```ts
import { router } from "jsr:@denosaurs/rutt";await Deno.serve(
router({
"/": (_req) => new Response("Hello world!", { status: 200 }),
}),
).finished;
```## Usage with `deno serve`
```ts
import { router } from "jsr:@denosaurs/rutt";export default {
fetch: router({
"/hello/:name": (_req, _, { name }) =>
new Response(`Hello ${name}`, { status: 200 }),
}),
};
```## Projects using `rutt`
- [denoland/fresh](https://github.com/denoland/fresh)
## Maintainers
- Elias Sjögreen ([@eliassjogreen](https://github.com/eliassjogreen))
- Dean Srebnik ([@load1n9](https://github.com/load1n9))
- Leo Kettmeir ([@crowlKats](https://github.com/crowlKats))### 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.