Gathering detailed insights and metrics for koa-static
Gathering detailed insights and metrics for koa-static
Gathering detailed insights and metrics for koa-static
Gathering detailed insights and metrics for koa-static
npm install koa-static
Typescript
Module System
Min. Node Version
Node Version
NPM Version
94.5
Supply Chain
94.1
Quality
82
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
137,376,248
Last Day
40,561
Last Week
519,584
Last Month
3,071,027
Last Year
36,038,294
1,141 Stars
122 Commits
112 Forks
20 Watching
4 Branches
33 Contributors
Minified
Minified + Gzipped
Latest Version
5.0.0
Package Id
koa-static@5.0.0
Size
2.95 kB
NPM Version
6.1.0
Node Version
10.4.1
Publised On
19 Jun 2018
Cumulative downloads
Total Downloads
Last day
-71.4%
40,561
Compared to previous day
Last week
-31.7%
519,584
Compared to previous week
Last month
-9.1%
3,071,027
Compared to previous month
Last year
11.1%
36,038,294
Compared to previous year
Koa static file serving middleware, wrapper for koa-send
.
1$ npm install koa-static
1const Koa = require('koa'); 2const app = new Koa(); 3app.use(require('koa-static')(root, opts));
root
root directory string. nothing above this root directory can be servedopts
options object.maxage
Browser cache max-age in milliseconds. defaults to 0hidden
Allow transfer of hidden files. defaults to falseindex
Default file name, defaults to 'index.html'defer
If true, serves after return next()
, allowing any downstream middleware to respond first.gzip
Try to serve the gzipped version of a file automatically when gzip is supported by a client and if the requested file with .gz extension exists. defaults to true.br
Try to serve the brotli version of a file automatically when brotli is supported by a client and if the requested file with .br extension exists (note, that brotli is only accepted over https). defaults to true.extensions
Try to match extensions from passed array to search for file when no extension is sufficed in URL. First found is served. (defaults to false
)1const serve = require('koa-static'); 2const Koa = require('koa'); 3const app = new Koa(); 4 5// $ GET /package.json 6app.use(serve('.')); 7 8// $ GET /hello.txt 9app.use(serve('test/fixtures')); 10 11// or use absolute paths 12app.use(serve(__dirname + '/test/fixtures')); 13 14app.listen(3000); 15 16console.log('listening on port 3000');
koa-static
to a specific pathMIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 6/30 approved changesets -- score normalized to 2
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
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-23
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