Gathering detailed insights and metrics for vp-static-server
Gathering detailed insights and metrics for vp-static-server
Gathering detailed insights and metrics for vp-static-server
Gathering detailed insights and metrics for vp-static-server
npm install vp-static-server
Typescript
Module System
Node Version
NPM Version
67.2
Supply Chain
95.3
Quality
72.9
Maintenance
100
Vulnerability
100
License
JavaScript (99.04%)
HTML (0.96%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
18,989
Last Day
1
Last Week
3
Last Month
28
Last Year
242
Apache-2.0 License
2 Stars
31 Commits
2 Branches
1 Contributors
Updated on Jan 28, 2023
Minified
Minified + Gzipped
Latest Version
1.0.4
Package Id
vp-static-server@1.0.4
Unpacked Size
39.26 kB
Size
11.30 kB
File Count
14
NPM Version
6.5.0-next.0
Node Version
11.6.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
200%
3
Compared to previous week
Last Month
7.7%
28
Compared to previous month
Last Year
-33.7%
242
Compared to previous year
Simple static server using express static middle-ware
npm install vp-static-server -g
npm install vp-static-server --save
git clone https://github.com/victor-perez/vp-static-server.git
vp-static-server [options]
or
vpss [options]
node bin/server [options]
this works only by npm > 2
npm run server -- [options]
will always run node bin/server -c ./vp-static-server.json
npm start
1var server = require('vp-static-server'), 2 options = {}, 3 app = server(options); //returns Express application
-r --root Document root to use [./]
-a --host Address to use [0.0.0.0]
-p --port Port to use [0] ( auto select )
-o --open Open server URL in your default browser [true]
-s --https Create a ssl server ( HTTPS ) [false]
--https-cert CERT file for ssl server [ssl/127.0.0.1.cert]
--https-key KEY file for ssl server [ssl/127.0.0.1.key]
--static-* Express.static options:
--static-dotfiles [ignore]
--static-etag [true]
--static-index [index.html]
--static-lastmodified [true]
--static-maxage [0]
--static-redirect [true]
more info http://expressjs.com/4x/api.html#express.static
-c --config Path to the configuration file
-h --help Print this list and exit.
Name | Type | Default | Description |
---|---|---|---|
root | string | ./ | Document root to use |
host | string | 0.0.0.0 | Address to use |
port | number | 0 | Port to use 0 = auto select |
open | boolean | true | Open server URL in your default browser |
https | boolean|object | false | Create a ssl server ( HTTPS ), if true it will use ssl/127.0.0.1.(cert|key) |
https.cert | string | ssl/127.0.0.1.cert | CERT file for ssl server |
https.key | string | ssl/127.0.0.1.key | KEY file for ssl server |
static | object | {} | Express.static options [http://expressjs.com/4x/api.html#express.static] |
1{ 2 "root": "./", 3 "static": { 4 "dotfiles": "ignore", 5 "etag": true, 6 "index": "index.html", 7 "lastModified": true, 8 "maxAge": 0, 9 "redirect": true 10 }, 11 "host": "0.0.0.0", 12 "port": 3000, 13 "open": true, 14 "https": false 15}
Name | Type | Default | Description |
---|---|---|---|
root | string | ./ | Document root to use |
host | string | 0.0.0.0 | Address to use |
port | number | 0 | Port to use 0 = auto select |
open | boolean | true | Open server URL in your default browser |
https | boolean|object | false | Create a ssl server ( HTTPS ), if true it will use ssl/127.0.0.1.(cert|key) |
https.cert | string | ssl/127.0.0.1.cert | CERT file for ssl server |
https.key | string | ssl/127.0.0.1.key | KEY file for ssl server |
static | object | {} | Express.static options [http://expressjs.com/4x/api.html#express.static] |
1var server = require('vp-static-server'), 2 options = { 3 root: "./", 4 static: { 5 dotfiles: "ignore", 6 etag: true, 7 index: "index.html", 8 lastModified: true, 9 maxAge: 0, 10 redirect: true 11 }, 12 host: "0.0.0.0", 13 port: 3000, 14 open: true, 15 https: false 16 }, 17 app = server(options); //returns express application
if you want to add middleware before the static middleware you can set autostart
to false
and call yourself vpStart()
to start the server
1var server = require('vp-static-server'), 2 options = { 3 root: "./", 4 static: { 5 dotfiles: "ignore", 6 etag: true, 7 index: "index.html", 8 lastModified: true, 9 maxAge: 0, 10 redirect: true 11 }, 12 host: "0.0.0.0", 13 port: 3000, 14 open: true, 15 https: false 16 }, 17 app = server(options, false); //returns express application 18 .use((req, res, next) = > { 19 console.log('log'); 20 next(); 21 }); 22 //start the server 23 app.vpStart();
npm test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/25 approved changesets -- score normalized to 0
Reason
project is archived
Details
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
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
15 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-17
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