# expressjs/serve-static

Serve static files

Repository: https://github.com/expressjs/serve-static
Canonical: https://ross.abutalabs.com/products/serve-static
Language: JavaScript
License: MIT
License Family: permissive
Topics: middleware, javascript, nodejs, expressjs, serve-files, send
Last push: 2026-01-03T18:08:02+00:00

## Health v2 (maintenance only)
Score: 64/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 60, release rhythm 49, longevity 100
- inputs: {"age_days": 4563, "days_push": 242, "days_rel": 261, "gap_med": 36.0, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1422, forks 241 (observed 2026-08-28T04:04:41.111184+00:00)

## What it is
A Node.js middleware library for serving static files from a root directory, built on the send module and commonly used with Express. It handles caching headers, ETags, range requests, and dotfile policies while falling through to the next middleware when files are not found.

## Use cases
- serve static files from a node.js server
- serve a frontend build folder with express
- add cache-control and etag headers to static assets
- map multiple directories to the same web address
- serve static assets with dotfile protection

## When to choose
- you need to serve static assets in an Express or Connect app
- you want fine-grained control over caching, ranges, and dotfile handling
- you want missing files to fall through to other middleware or routes

## When to avoid
- you need a full standalone static file server with directory listing
- you serve assets from a CDN or object storage instead of disk
- you need dynamic server-side rendering of files

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

## Member repositories
- expressjs/serve-static (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:41.111184+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-30T04:37:41.561388+00:00, confidence not recorded.
  - readme: https://github.com/expressjs/serve-static (fetched 2026-08-28T04:04:41.111184+00:00, sha 9bc768be4d51)
  - registry_npm: https://registry.npmjs.org/serve-static (fetched 2026-08-29T11:50:04.290066+00:00, sha 1ddb39867e8e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
