Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 days 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 (3 months ago)
- Last Synced: 2024-10-30T01:22:24.465Z (about 2 months 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: 59
- 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.