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

hookforward

v0.3.1

Published

Simple setup for forwarding webhooks to an app running on your local machine

Readme

Hookforward

Hookforward allows you to forward webhooks from an external provider to an app running on your local machine without having to expose ports.

You need a publicly accessible CouchDB server that your webhook provider can post to. On your local machine, you run a simple program that listens for new webhook docs in CouchDB and forwards them to the url of your dev server.

I used this setup to develop an app that receives Stripe webhooks. Nice to be able to run the app on my local machine and have the whole moustrap work.

This is an alternative to using a service like Localtunnel. Localtunnel works ok (via voodoo I don't understand), but because they recycle urls frequenly, my app was receiving webhooks from various oddball services that the url was previously used for. Creepy.

One-time setup

  1. Get a publicly accessible CouchDB server (free plans available from IrisCouch and Cloudant)

  2. Run the hookforward push command with your desired DB url, e.g.:

hookforward push https://user:[email protected]/hooks

This will create the DB if it doesn't already exist, and push a design doc with a hook capture update function.

  1. Set 2 will output the hook capture url for your DB. Configure your webhook provider to post hooks to this url for development/testing.

Usage

Start the forwarder server on your dev machine with the hookforward start command, specifying the db url and the url you'd like to forward your webhook to, e.g.:

hookforward start https://user:[email protected]/hooks http://localhost:4567/myhandler

Testing the setup

Trigger a test webhook from your webhook provider, or use the hookforward test command, e.g.:

hookforward test https://user:[email protected]/hooks

Here's a simple one-line Sinatra app to test receiving webhooks, which will just dump the contents to STDOUT:

ruby -rubygems -r sinatra -e "post('*') { puts request.body.read }"

hookforwardrc

You can create a .hookforwardrc file with your DB and handler urls:

{
  "db_url": "https://user:[email protected]/hooks",
  "handler_url": "http://localhost:4567/myhandler"
}

This will allow you to run hookforward commands without having to specify urls, e.g. you can just run hookforward start

Caveats

This setup won't work for webhooks that contain binary data -- CouchDB will only accept binary data if it's encoded as Base64.