Gathering detailed insights and metrics for express-static-zip
Gathering detailed insights and metrics for express-static-zip
Gathering detailed insights and metrics for express-static-zip
Gathering detailed insights and metrics for express-static-zip
Serve static files out of a ZIP without unpacking.
npm install express-static-zip
Typescript
Module System
Min. Node Version
Node Version
NPM Version
69.7
Supply Chain
82.8
Quality
75
Maintenance
50
Vulnerability
100
License
JavaScript (100%)
Total Downloads
33,509
Last Day
3
Last Week
65
Last Month
385
Last Year
5,595
4 Stars
54 Commits
7 Forks
2 Watchers
3 Branches
2 Contributors
Updated on Sep 15, 2023
Minified
Minified + Gzipped
Latest Version
0.2.3
Package Id
express-static-zip@0.2.3
Unpacked Size
54.44 kB
Size
37.43 kB
File Count
8
NPM Version
6.14.4
Node Version
14.2.0
Cumulative downloads
Total Downloads
Serve static files out of a ZIP without unpacking.
Keeping client-side dependency libraries in the repository is a good practice, but there are huge ones like dojo and some proprietary ones like Arcgis JS API containing thousands of small files, making it a mess. You either go with them, making the repo at least ten times slower, or use the (sometimes internally) hosted ones, messing with versions and switching paths.
This module provides a means to serving such libraries or arbitrary static file packages right out of a ZIP without unpacking. Zipped library goes well with the repos even when they are several tens of megabytes in size. Zipped library doesn't pollute your repo with its contents.
You can add a classic express.static
for production environment, with an unzip deployment
script.
Provided you have a biglib.zip
in your root server folder, and serving library on url root:
1var express = require('express'); 2var staticZip = require('express-static-zip'); 3 4var app = express(); 5 6app.use(staticZip('./biglib.zip')); 7 8app.listen(process.env.PORT || 3000);
Now you are free to GET
/some/files/inside/zip.txt
1app.use(staticZip('./biglib.zip', {
2 zipRoot: "a-folder/"; // Use a directory inside ZIP file as
3 // the root (Default: "")
4
5 skip: ["file-in-a-folder.txt"] // Do not server specified files (paths
6 // relative to zipRoot, default: [])
7}));
Zip compressed content is loaded into memory synchronously at startup. It doesn't take long, some 50-300ms for a 20Mb JS lib with ~15k files.
Files are decompressed and cached in-memory upon request.
Tests are in the test/
directory. Install dev dependencies and use mocha
. Coverage is rather full.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
project is archived
Details
Reason
Found 2/29 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
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 MoreLast Day
0%
3
Compared to previous day
Last Week
-27%
65
Compared to previous week
Last Month
15.6%
385
Compared to previous month
Last Year
200.3%
5,595
Compared to previous year