# @tinyhttp/router

> Router for tinyhttp

Latest version **2.2.5** (published 2026-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tinyhttp/router
pnpm add @tinyhttp/router
yarn add @tinyhttp/router
bun add @tinyhttp/router
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.2.5 |
| Published | 2026-02-08 |
| First published | 2020-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=14.0.0 |
| Dependencies | 1 |
| Unpacked size | 24.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 2901 |
| Author | v1rtl |
| Maintainers | dropthebeatbro, v1rtl |
| Keywords | tinyhttp, node.js, web framework, web, backend, router |

## Links

- npm: https://www.npmjs.com/package/@tinyhttp/router
- Repository: https://github.com/tinyhttp/tinyhttp
- Homepage: https://tinyhttp.v1rtl.site
- Issues: https://github.com/tinyhttp/tinyhttp/issues
- npm.io page: https://npm.io/package/@tinyhttp/router

## Dependencies (1)

- [regexparam](https://npm.io/package/regexparam.md) ^2.0.2

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 2.2.5 (latest) — 2026-02-08
- 2.2.4 — 2026-02-08
- 2.2.3 — 2024-09-11
- 2.2.2 — 2024-01-06
- 2.2.1 — 2023-08-04
- 2.2.0 — 2023-05-23
- 2.1.1 — 2023-05-14
- 2.1.0 — 2023-05-08
- 2.0.7 — 2023-01-11
- 2.0.6 — 2022-09-15
- 2.0.5 — 2022-06-05
- 2.0.4 — 2021-10-28
- 2.0.3 — 2021-10-23
- 2.0.2 — 2021-09-23
- 2.0.1 — 2021-09-07
- … 46 more at https://npm.io/package/@tinyhttp/router/versions

## README

# @tinyhttp/router

[![npm (scoped)][npm-badge]](https://npmjs.com/package/@tinyhttp/router) [![npm][dl-badge]](https://npmjs.com/package/@tinyhttp/router)

Framework-agnostic HTTP router.

## Install

```sh
pnpm i @tinyhttp/router
```

## Example

```js
import { Router } from '@tinyhttp/router'

const router = new Router()

router.get('/', (req, res) => res.send('Hello World'))

console.log(router.middleware)
```

[npm-badge]: https://img.shields.io/npm/v/@tinyhttp/router?style=flat-square
[dl-badge]: https://img.shields.io/npm/dt/@tinyhttp/router?style=flat-square

---
_Source: https://npm.io/package/@tinyhttp/router · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
