serve-static
npmv2.2.1Serve static files
Safe to adopt
Yes — serve-static scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 268 days ago. 7 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- BMaintenance: grade B, Good.
Last published 268 days ago. 7 releases in the last 2 years.
- BWeight: grade B, Good.
Pulls in 19 transitive packages, about 445 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 3 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding serve-static to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing serve-static, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >= 18
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the serve-static README.
const serveStatic = require('serve-static')Dependencies
Declared by serve-static v2.2.1. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (10)
Used by
Popular packages that depend on serve-static.
Relationship graph
Dependencies (left) and dependents (right) of serve-static.
Frequently installed together
Experimental debugger shell for React Native for use with @react-native/debugger-frontend
Open stuff like URLs, files, executables. Cross-platform.
Lightweight debugging utility for Node.js and the browser
High performance middleware framework
An HTTP/1.1 client, written from scratch for Node.js
invariant
The time-based use-recency-unaware cousin of [`lru-cache`](http://npm.im/lru-cache)
Launch latest Edge with the Devtools Protocol port open
Debugger frontend for React Native based on Chrome DevTools
Launch latest Chrome with the Devtools Protocol port open
flow typed nullthrows
Node.js body parsing middleware
Release history
3 releases in the last two years, typically about 47 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 2.2.1latest | 8 months ago | 14 KB | MIT |
| 1.16.3 | 8 months ago | 25 KB | MIT |
| 2.2.0 | 1 year ago | 25 KB | MIT |
| 1.16.2 | 2 years ago | 25 KB | MIT |
| 1.16.1 | 2 years ago | 25 KB | MIT |
| 2.1.0 | 2 years ago | 25 KB | MIT |
| 1.16.0 | 2 years ago | 25 KB | MIT |
| 2.0.0 | 2 years ago | 25 KB | MIT |
| 2.0.0-beta.2 | 2 years ago | 25 KB | MIT |
| 1.15.0 | 4 years ago | 25 KB | MIT |
| 2.0.0-beta.1 | 4 years ago | 25 KB | MIT |
| 1.14.2 | 4 years ago | 24 KB | MIT |
| 1.14.1 | 7 years ago | 24 KB | MIT |
| 1.14.0 | 7 years ago | 24 KB | MIT |
| 1.13.2 | 8 years ago | 24 KB | MIT |
Overview
serve-static is an npm package that serve static files. It has 3 known dependents in the graph. The latest version is 2.2.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need serve static files and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use serve-static?
Yes — serve-static scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 268 days ago. 7 releases in the last 2 years.
How do I install serve-static?
Run `npm install serve-static` to add serve-static to your npm project.
How many dependencies does serve-static have?
serve-static declares 14 direct dependencies and pulls in 19 packages in total once its runtime tree is resolved totalling about 445 KB on disk.
What license is serve-static released under?
serve-static is distributed under the MIT license. Its dependency tree also includes: ISC, MIT.
How popular is serve-static?
npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on serve-static.
Is serve-static still maintained?
The most recent release of serve-static (v2.2.1) was published 8 months ago.
Does serve-static run install scripts?
No. serve-static does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.