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

micro-metrics

v0.4.0

Published

micro email api

Downloads

27

Readme

micro-metrics

a microservice metrics api server using docker

API Routes

  • /api/track (POST)

    Create a new metric to track. Payload must be a JSON packet, can have the following params:

    • type (required) the name of the metric type you want to track
    • tags an object in which the keys are the tag name and the values the associated value for that tag
    • value the value of the metric. Can be any valid JSON type (string, number, object, array, etc). The default value is the number 1.
    • data any data you want to store about this metric. Can be any JSON type.
    • userID a string name indicating which user to associate this metric with

    (see tests for examples)

  • /api/report?filter1=filter1value&filter2=filter2value... (GET)

    Search the tracked metrics to get a list of matching metrics. Filters can include any of the following:

    • type retrieves all metrics of the indicated type
    • tags a comma-separated list of tag queries. Each query can be either a tag name or a tag name=value pair. If just a tag name, it will retrieve all metrics with a tag of that name, regardless of the tag's value. If you pass a name=value pair, it will retrieve only the metrics with that tag name for which the value also matches.
    • startDate/endDate a Javascript-parseable Date string, limiting the metrics returned by the maximum/minimum date of creation
    • value retrieve all metrics with the indicated value
  • /api/tags?filter1=filter1value&filter2=filter2value... (GET)

    Search the metric database for matching metrics, and return all tags names and a corresponding list of all values for that tag name for the matching metrics. Metric filters can be any field that was passed in the payload for /api/track. Result will be a JSON object like so:

    {
      tagName1: ['tagValue1','tagValue2'],
      tagName2: ['tagValue1', 'tagValue3', 'tagValue4']
    }
  • /api/types (GET)

Returns a list of all the metric types in the database.