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

webhook-forwarder

v1.0.1

Published

simple webhook forwarder with subscribe and auto cleanup

Downloads

14

Readme

Webhook-forwarder

simple webhook forwarder with subscribe and auto cleanup.

Install

npm

npm i -g webhook-forwarder
webhook-forwarder [OPTIONS]

github

git clone [email protected]:vigour-io/webhook-forwarder.git &&\
cd webhook-forwarder &&\
npm i &&\
npm start -- [OPTIONS]

Usage

Options

| option | alias | description | | --- | --- | --- | | -p | --port | The port used to listen for incoming webhooks and /subscribe requests | | -s | --strikes | The amount of times a subscriber is allowed to be unresponsive at a hook forward. When no strikes are left, the subscriber is removed, when responsive, strikes are reset. | | -d | --database.url | Redis database server to connect to for storing subscription info (true defaults to 127.0.0.1:6379) | | -w | --database.password | Password to your Redis server | | -l | --database.label | Identifier used to grab a namespace within the database | | -h | --help | Show help |

Environment variables

Each option can be set using environment variables in all caps and prefixed with WHF_, with __ for dots.

  • DEBUG=[str]
  • WHF_PORT=[int]
  • WHF_STRIKES=[int]
  • WHF_DATABASE__URL=[str]
  • WHF_DATABASE__PASSWORD=[str]
  • WHF_DATABASE__LABEL=[str]

API

Subscribe

Used to subscribe to a webhook endpoint, meaning all webhooks landing on this endpoint will be forwarded to the subscriber.

endpoint: /subscribe

Method: GET

Parameters:

| parameter | description | example | | --- | --- | --- | | endpoint | All webhooks landing on this endpoint should be forwarded to the subscriber | travis | | url | The url that the webhooks should be forwarded to | http://forward-to.me/travis URI encoded http%3A%2F%2Fforward-to.me%2Ftravis |

Example

http://my-webhook-forwarder.com/subscribe?endpoint=travis&url=http%3A%2F%2Fforward-to.me%2Ftravis

Easy way to get these query strings URI encoded:

const querystring = require('querystring')

const exampleString = querystring.stringify({
  endpoint: 'travis',
  url: 'http://forward-to.me/travis'
})

// exampleString is now
// "endpoint=travis&url=http%3A%2F%2Fforward-to.me%2Ftravis"

Webhooks

Any POST requests landing on the forwarder will be accepted, and if there is a subscriber for the endpoint the hookshot was fired on, it will be forwarded.

endpoint: /*

Method: POST

Database

The databse is used to keep a persistant and possibly shared record of subscribers.

Label

options.database.label is used to create a namespace and enable the forwarder to find it's subscribers on load.

A forwarder with label myLabel will find it's subscribers as follows:

redis> SMEMBERS myLabel
1) "myLabel/travis"
2) "myLabel/endpoint2"

redis> SMEMBERS myLabel/travis
1) "http://forward-to.me/travis"
2) "http://also-to.me/travis"

redis> SMEMBERS myLabel/endpoint2
1) "http://forward-to.me/stuff"
2) "http://random.me-too/webhooks"