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
82.1
Supply Chain
95.2
Quality
83.8
Maintenance
100
Vulnerability
99.3
License
TypeScript (78.72%)
HTML (10.52%)
JavaScript (10.46%)
Shell (0.3%)
Total Downloads
292,910,011
Last Day
172,041
Last Week
1,289,254
Last Month
5,718,833
Last Year
71,687,863
9,470 Stars
769 Commits
693 Forks
101 Watching
5 Branches
156 Contributors
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
Publised On
15 Oct 2024
Cumulative downloads
Total Downloads
Last day
-29.6%
172,041
Compared to previous day
Last week
-8.2%
1,289,254
Compared to previous week
Last month
-0.3%
5,718,833
Compared to previous month
Last year
-14.4%
71,687,863
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)
Stable Version
5
7.5/10
Summary
Path Traversal in serve
Affected Versions
< 7.1.3
Patched Versions
7.1.3
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
4
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
2 existing vulnerabilities detected
Details
Reason
Found 18/30 approved changesets -- score normalized to 6
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
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
Score
Last Scanned on 2024-12-16
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