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

serveit2

v1.2.0

Published

Quick and dirty static HTTP2 server

Readme

serveit2

Quick & dirty static HTTP2 server

Installation

npm i serveit2 -g

CLI

  Usage
  -----
  $ serveit2 [port]

  Options
  -------
  -g, --gzip Turn on gzipping
  -q, --quiet Turn off logger output
  -x, --no-conf Do not parse config file (ignore .serveit2 config file in the root public dir)
  -r, --root Server root directory (defaults to `cwd`)

  Examples
  --------
  $ serveit2
  $ serveit2 7000 -g -r=/User/something/somewhere

Default port is: 5000

Programmatic

var serveit2 = require('serveit2');
var options = {
  port: 7000, // Default 5000
  root: '/User/something/whatever', // Default .
  push: {'index.html': ['js/app.js', 'css/styles.css']}, // Default {}
  quiet: true, // Default false
  gzip: true, // Default false
}

var server = serveit2(options, function (port) {
  console.log('Server runs on port', port);
});

// close the server after 60 seconds
setTimeout(function () {
  server.kill();
}, 60 * 1000);

Server push

SPDY & HTTP2 support a mechanism to push assets to the client, before the client requested them. You can find out more about server push here

To enable server push you can add a config file named .serveit2 to the directory, your invoking your server from (eg. the current working directory).

A basic config for server push could look like this:

{
  "push": {
    "index.html": ["js/app.js", "css/style.css"]
  }
}

Given that config file, the files js/app.js & css/style.css would be delivered to the client immediatly when the index.html is requested. Depending on their size, they could even finish downloading faster then the actual reuqested file.

Compare the logger output with push used:

PUSH /js/app.js - 20
PUSH /css/screen.css - 25
GET /index.html 200 12.335 ms - 678
GET /css/screen.css 304 1.960 ms - -
GET /js/app.js 304 1.466 ms - -

and without push being used:

GET /index.html 200 12.335 ms - 678
GET /css/screen.css 200 1.960 ms - 25
GET /js/app.js 200 1.466 ms - 20

Config file

The config file is not only a source where you can configure your push requests, everything than can be set programmatically or via the cmd can also be set via the config file

{
  "port": 7000,
  "root": "/User/something/whatever",
  "push": {"index.html": ["js/app.js", "css/styles.css"]},
  "quiet": true,
  "gzip": true
}

License

MIT