npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vp-static-server

v1.0.4

Published

Simple static server using express static middleware works both on HTTP and HTTPS

Readme

Dependency Status devDependency Status

NPM

vp-static-server

Simple static server using express static middle-ware

Getting Started

Install

Global

npm install vp-static-server -g

Project dependency

npm install vp-static-server --save

GIT

git clone https://github.com/victor-perez/vp-static-server.git

Usage

global

vp-static-server [options]

or

vpss [options]

node

node bin/server [options]

npm run

this works only by npm > 2

npm run server -- [options]

npm start

will always run node bin/server -c ./vp-static-server.json

npm start

scripting

var server = require('vp-static-server'),
    options = {},
    app = server(options); //returns Express application

Options

cli, node & npm run

-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.                                  

config.json

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]

example

{
    "root": "./",
    "static": {
        "dotfiles": "ignore",
        "etag": true,
        "index": "index.html",
        "lastModified": true,
        "maxAge": 0,
        "redirect": true
    },
    "host": "0.0.0.0",
    "port": 3000,
    "open": true,
    "https": false
}

scripting

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]

example

var server = require('vp-static-server'),
    options = {
        root: "./",
        static: {
            dotfiles: "ignore",
            etag: true,
            index: "index.html",
            lastModified: true,
            maxAge: 0,
            redirect: true
        },
        host: "0.0.0.0",
        port: 3000,
        open: true,
        https: false
    },
    app = server(options); //returns express application

example delay start

if you want to add middleware before the static middleware you can set autostart to false and call yourself vpStart() to start the server

var server = require('vp-static-server'),
    options = {
        root: "./",
        static: {
            dotfiles: "ignore",
            etag: true,
            index: "index.html",
            lastModified: true,
            maxAge: 0,
            redirect: true
        },
        host: "0.0.0.0",
        port: 3000,
        open: true,
        https: false
    },
    app = server(options, false); //returns express application
    .use((req, res, next) = > {
        console.log('log');
        next();
    });
	//start the server
    app.vpStart();

Testing

npm test