# ZijianHe/koa-router

Router middleware for koa.

Repository: https://github.com/ZijianHe/koa-router
Canonical: https://ross.abutalabs.com/products/koa-router
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-02-28T11:03:43+00:00

## Health v2 (maintenance only)
Score: 54/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 69, release rhythm 8, longevity 100
- inputs: {"age_days": 4751, "days_push": 186, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4814, forks 398 (observed 2026-08-28T04:09:00.308169+00:00)

## What it is
koa-router is Express-style routing middleware for the Koa web framework, supporting named parameters, nested routers, and async/await. It handles HTTP method routing, OPTIONS responses, and 405/501 error handling.

## Use cases
- define REST routes in a Koa app
- route HTTP requests with named URL parameters
- nest and prefix routers in a Node.js API
- generate URLs from named routes
- handle 405 method-not-allowed responses automatically

## When to choose
- you use Koa and want familiar Express-style routing
- you need nested routers and route middleware
- you want automatic OPTIONS and 405 handling

## When to avoid
- you use Express or Fastify, which have built-in routers
- you need a full web framework rather than routing middleware

## Facets
- artifact type: library
- maturity: stable
- function: routing, middleware, http-server, web-framework
- domain: web-development, backend, apis
- platform: -
- tags: koa, express-style-routing, rest, url-parameters, nodejs

## Member repositories
- ZijianHe/koa-router (main) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:00.308169+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:18:34.895796+00:00, confidence not recorded.
  - readme: https://github.com/ZijianHe/koa-router (fetched 2026-08-28T04:09:00.308169+00:00, sha 6b27553a7776)
- Data as of 2026-08-30T08:39:29.467469+00:00.
