connect-static-file

JSON →
library 2.0.0 ·javascript maintenance
verified May 27, 2026

connect-static-file is a lightweight middleware for Connect and Express applications designed to serve a single static file. Unlike `express.static` which serves entire directories, this module focuses on efficiently delivering a specified file, making it ideal for specific assets like `index.html` or a `robots.txt`. The current stable version is 2.0.0, with its last major update occurring in 2017, suggesting a low-cadence, maintenance-focused project. A key differentiator is its `encoded` option, allowing developers to serve pre-compressed files (e.g., gzip) directly, optimizing client delivery by avoiding on-the-fly compression. It also provides fine-grained control over HTTP caching headers like `ETag`, `Last-Modified`, and `Cache-Control` (`maxAge`).

total hits 55
actors 9 distinct systems
last hit 3d ago human
ByteDance
11
Amazonbot
4
MetaBot
4
GPTBot
2
Script
1
Search engines
2
Humans
6

top countries 🇨🇦 Canada · 🇺🇸 United States · 🇸🇬 Singapore · 🇩🇪 Germany · BD