Gathering detailed insights and metrics for serve
Gathering detailed insights and metrics for serve
Gathering detailed insights and metrics for serve
Gathering detailed insights and metrics for serve
npm install serve
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (78.72%)
HTML (10.52%)
JavaScript (10.46%)
Shell (0.3%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
9,664 Stars
769 Commits
698 Forks
106 Watchers
5 Branches
164 Contributors
Updated on Jul 15, 2025
Latest Version
14.2.4
Package Id
serve@14.2.4
Unpacked Size
25.24 kB
Size
8.55 kB
File Count
4
NPM Version
10.7.0
Node Version
18.20.4
Published on
Oct 15, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
serve
helps you serve a static site, single page application or just a static file (no matter if on your device or on the local network). It also provides a neat interface for listing the directory's contents:
Once it's time to push your site to production, we recommend using Vercel.
serve
v14 onwards requires Node v14 to run. Please useserve
v13 if you cannot upgrade to Node v14.
The quickest way to get started is to just run npx serve
in your project's directory.
If you prefer, you can also install the package globally (you'll need at least Node LTS):
1> npm install --global serve
Once that's done, you can run this command inside your project's directory...
1> serve
...or specify which folder you want to serve:
1> serve folder-name/
Finally, run this command to see a list of all available options:
1> serve --help
Now you understand how the package works! :tada:
To customize serve
's behavior, create a serve.json
file in the public folder and insert any of these properties.
The core of serve
is serve-handler
, which can be used as middleware in existing HTTP servers:
1const handler = require('serve-handler'); 2const http = require('http'); 3 4const server = http.createServer((request, response) => { 5 // You pass two more arguments for config and middleware 6 // More details here: https://github.com/vercel/serve-handler#options 7 return handler(request, response); 8}); 9 10server.listen(3000, () => { 11 console.log('Running at http://localhost:3000'); 12});
You can also replace
http.createServer
withmicro
.
If you want a feature to be added, or wish to report a bug, please open an issue here.
If you wish to contribute to the project, please read the contributing guide first.
This project used to be called list
and micro-list
. But thanks to TJ Holowaychuk handing us the new name, it's now called serve
(which is much more definite).
Leo Lamprecht (@leo)
7.5/10
Summary
Path Traversal in serve
Affected Versions
< 7.0.0
Patched Versions
7.0.0
0/10
Summary
Cross-Site Scripting in serve
Affected Versions
< 10.0.2
Patched Versions
10.0.2
0/10
Summary
Path Traversal in serve
Affected Versions
< 10.1.2
Patched Versions
10.1.2
0/10
Summary
Byass due to validation before canonicalization in serve
Affected Versions
< 6.5.2
Patched Versions
6.5.2
7.5/10
Summary
Directory Traversal in serve
Affected Versions
< 7.1.3
Patched Versions
7.1.3
5.3/10
Summary
vercel/serve allows access to restricted files if filename is URL encoded.
Affected Versions
< 6.5.2
Patched Versions
6.5.2
0/10
Summary
Cross-Site Scripting in serve
Affected Versions
< 10.0.2
Patched Versions
10.0.2
6.5/10
Summary
Directory Traversal in serve
Affected Versions
<= 6.4.8
Patched Versions
6.4.9
5.3/10
Summary
Information Exposure on Case Insensitive File Systems in serve
Affected Versions
< 7.0.0
Patched Versions
7.0.0
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 18/30 approved changesets -- score normalized to 6
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More