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

tap-headers

v1.3.0

Published

Express middleware for exploring request and response headers

Downloads

1

Readme

Tap Headers

Express middleware for easily viewing request and response headers in the browser.

About

Tired of having to open the Chrome DevTools network tab and click through the requests to see what headers were sent or received? This middleware captures all incoming and outgoing headers for your Express application, and presents them in an easy-to-read format on a webpage running on a different port. The headers are logged in real time, so leaving this page open in a separate window may make certain debugging tasks much easier.

This package can also be used as an educational tool to explore or demonstrate the request-response cycle, or to ensure that the right headers are sent via other programs such as curl or Postman.

Tap Headers is not suitable for production environments.

Installation

npm install tap-headers

Usage

// inside your express app
const tapHeaders = require('tap-headers');
app.use(tapHeaders());

Navigate to http://localhost:3001 to view the record of request and response headers. Every new request is given a new id, and the most recent requests will be updated in real time at the top of the page.

Tap headers screenshot

Options

The tapHeaders() invocation accepts a optional coniguration object. The available options are listed below together with their default values.

const options = {
  port: 3001,         // the port to use for the monitor webpage
  includeBody: false  // whether to include the request body in the info logged
}
app.use(tapHeaders(options));

Tech Stack

Calling tapHeaders() initiates a very basic web server on port 3001 that serves the HTML, JavaScript and CSS that make up the webpage displaying the headers received and sent so far. The return value of the function is a standard Express middleware function of the type (req, res, next) => { ... }.

As soon as a request is received by the Express server, the middleware assigns it a request ID that it will also use for the data from the response. The request headers can be immediately sent to a stream that relays them to the simple webserver on port 3001 via WebSockets.

Response headers are captured by overwriting the end() method of Node's http.ServerResponse class. The new method sends the headers to the relay stream before invoking the original method.

The frontend website itself is built with React.