# koajs/static

Static file server middleware

Repository: https://github.com/koajs/static
Canonical: https://ross.abutalabs.com/products/koajs-static
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2025-10-20T17:16:30+00:00

## Health v2 (maintenance only)
Score: 54/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 48, release rhythm 35, longevity 100
- inputs: {"age_days": 4764, "days_push": 317, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1147, forks 113 (observed 2026-08-28T04:03:45.982857+00:00)

## What it is
koa-static is static file serving middleware for the Koa web framework, wrapping koa-send. It serves files from a root directory with support for caching headers, gzip/brotli precompressed files, index files, and extension matching.

## Use cases
- serve static assets from a koa app
- serve a frontend build directory with node
- serve gzip or brotli precompressed files
- serve index.html for directory requests
- add cache headers to static file responses

## When to choose
- you use Koa and need to serve static files
- you want automatic serving of precompressed .gz/.br assets
- you need simple, well-maintained static file middleware

## When to avoid
- you use Express or Fastify (use their native static middleware)
- you need a full standalone static file server rather than middleware
- you need advanced features like range requests customization beyond koa-send

## Facets
- artifact type: library
- maturity: stable
- function: http-server, middleware, file-upload
- domain: web-development, backend, developer-tools
- platform: -
- tags: koa, static-files, file-serving, middleware, gzip, brotli, nodejs, web-server

## Member repositories
- koajs/static (main) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:45.982857+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-30T06:34:03.090410+00:00, confidence not recorded.
  - readme: https://github.com/koajs/static (fetched 2026-08-28T04:03:45.982857+00:00, sha b2c5aeb1785d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
