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

serverless-webmentions

v0.2.1

Published

serverless webmention receiver

Readme

serverless-webmentions

This is an example for setting up a webmention serverless endpoint.

Deploy to Netlify

Clicking the "Deploy to Netlify" button will fork this repository and create a new Netlify site which, after configuration, will be ready to start receiving webmentions for your site.

Setup

The only environment variable that is required is URLS.

| Environment Variable | Description | Required | | --- | --- | --- | | URLS | A comma separated list of domains you accept webmentions to | ✅ | | GENERATED_TOKEN | Use https://generate-random.org/string-generator. Some routes require this token. | | | NETLIFY_SITEID | Configured automatically by default | | | NETLIFY_TOKEN | Configured automatically by default | | | WEBHOOK | URL to send POST requests to after you receive a webmention. See ntfy.sh. |

Usage

POST /webmention

Main webmention receiver. Adds webmention to queue to be processed at a later time.

curl -X POST 'https://wm.example.com/webmention' -d source=https://example.net -d target=https://example.com

GET /webmentions

Returns currently saved webmentions. There are two options:

  • /webmentions?token=<token> to return a list of all webmentions received for all targets where token should match GENERATED_TOKEN.
  • /webmentions?url=<url> to return a list of webmentions for url.

Sample response:

{
  "https://example.com/target": [
    {
      "source": "https://source",
      "target": "https://example.com/target",
      "parsed": "2025-05-27T00:00:00.000Z",
      "type": "like",
      "author": {
        "type": "h-card",
        "value": "",
        "url": "https://source2",
        "photo": "",
      }
    }
  ],
  "https://example.com/target2": [
    {
      "source": "https://source2",
      "target": "https://example.com/target2",
      "parsed": "2025-05-27T00:00:00.000Z",
      "type": "mention",
      "author": {
        "type": "h-card",
        "value": "",
        "url": "https://source2",
        "photo": "",
      }
    }
  ]
}

GET /import?token&webmentionio

To import all webmentions from webmention.io to your endpoint. Requires token (should match GENERATED_TOKEN) and webmentionio which should be your webmention.io token.

GET /process

This route processes your currently queued webmentions which, if valid, will add them to the corresponding target. In it's current configuration it is called internally by Netlify once a day and it is not accessible publicly. This behaviour can change by editing netlify.toml.

GET /cleanup?token

Only use while testing. This request will clear all webmentions and items from the queue. Do not enable this if it's not needed.