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 🙏

© 2025 – Pkg Stats / Ryan Hefner

hook-relay

v0.1.10

Published

Relay for webhook events

Downloads

1,869

Readme

hook-relay

Overview

hook-relay receives webhooks at a server that acts as a single endpoint, and broadcasts these to clients connected via WebSocket. Clients forward the requests to another endpoint (e.g., a development server).

Use case

Developing Slack Apps with Multiple Developers

When developing Slack Apps, you can only configure a single endpoint URL. This creates inefficiency when multiple developers need to work simultaneously, as each developer would traditionally need their own Slack App and a proxy solution like ngrok to route requests to their local environment.

With hook-relay, you can maintain just one Slack App and endpoint while allowing multiple developers to connect to it. Each developer can filter for only the events they need, making the development process more efficient and collaborative.

Handling OAuth Callbacks in Development

When developing OAuth integrations, you need to receive callbacks on your local development server. Unlike webhooks, it's not always clear which client should receive the callback based on its content.

hook-relay solves this by allowing you to register one-shot callback receivers. This works well for development as long as multiple developers don't need callbacks at exactly the same time.

Usage

$ hook-relay-server --help
Usage: hook-relay-server [options]

Options:
  -V, --version                    output the version number
  --port <number>                  Port to listen on (default: 3000, env: PORT)
  --challenge-passphrase <string>  Passphrase for challenge response (env: CHALLENGE_PASSPHRASE)
  --log-level <string>             Log level (default: "info", env: LOG_LEVEL)
  -h, --help                       display help for command
$ hook-relay-client --help
Usage: hook-relay-client [options]

Options:
  -V, --version                     output the version number
  --server-endpoint <string>        Server endpoint URL
  --forward-endpoint <string>       Forward endpoint URL
  --path <string>                   Path to use
  --log-level <string>              Log level (default: "info")
  --filter-body-regex <string>      Filter body regex
  --reconnect-interval-ms <number>  Reconnect interval in milliseconds (default: "1000")
  --port <number>                   Port to listen on (default: 3001, env: PORT)
  --challenge-passphrase <string>   Passphrase for challenge response (env: CHALLENGE_PASSPHRASE)
  -h, --help                        display help for command
# Register a oneshot callback
$ client_id=$(curl -SsfL localhost:3001 | jq -r .clientId) # get client id by HTTP
$ curl -H 'content-type: application/json' \
  -XPOST http://localhost:3000/callback/oneshot/register  \
  -d "{\"path\":\"/auth/redirect\",\"clientId\":\"$client_id\"}"
{"callbackUrl":"http://localhost:3000/callback/oneshot/auth/redirect"}

License

MIT