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

excelso-pulse-express

v0.1.6

Published

Health & Business Pulse for Express: protected JSON pulse, pluggable probes (MongoDB by default).

Readme

excelso-pulse-express

Español: README.es.md

Health & Business Pulse for Express apps (and reusable from Next.js or other runtimes via collectPulse).

  • Stable JSON (pulse_version: "1"), technical metrics, optional business KPIs, ai_context text, pluggable infrastructure probes.
  • readiness (starting | ready) and user_impact (none | limited | outage) computed server-side (e.g. Mongo connectingstarting + none so UIs do not treat it as an outage).
  • Authorization: Bearer protection (timing-safe comparison).
  • Default MongoDB probe (ping + transient state handling).
  • Optional Express router with per-IP rate limiting.

Install

npm install excelso-pulse-express express mongoose

mongoose is a peer dependency if you use the default probes; supply getProbes / probes to avoid it.

Express: mount the endpoint

import express from "express";
import { createPulseExpressRouter } from "excelso-pulse-express";

const app = express();

const pulse = createPulseExpressRouter({
  bearerToken: process.env.PULSE_BEARER_TOKEN,
  productName: process.env.PULSE_PRODUCT_NAME ?? "my-app",
  environment: process.env.NODE_ENV,
  aiContext: process.env.PULSE_AI_CONTEXT ?? "",
  businessMetricsJson: process.env.PULSE_BUSINESS_METRICS_JSON,
  relativePath: "pulse", // GET /internal/pulse when mounted below
});

if (pulse) {
  app.use("/internal", pulse);
}

If bearerToken is missing or empty, createPulseExpressRouter returns null (no route is exposed).

Next.js / aggregator (data only)

import { collectPulse } from "excelso-pulse-express";

export async function GET() {
  const body = await collectPulse({
    productName: "web",
    businessMetricsJson: process.env.PULSE_BUSINESS_METRICS_JSON,
  });
  return Response.json(body);
}

Add your own auth in production; this sample does not enforce Bearer on the Route Handler.

Public API

| Export | Purpose | | ------------------------------------------------------ | ----------------------------------------- | | createPulseExpressRouter | Ready-to-mount Express Router. | | collectPulse | Build the payload without Express. | | createPulseBearerAuthMiddleware | Bearer-only middleware for custom routes. | | getDefaultPulseProbes, createMongooseDatabaseProbe | Extend infrastructure checks. | | derivePulsePresentation | Same heuristic as collectPulse if you build JSON manually. | | Types (PulsePayload, PulseProbe, PulseReadiness, …) | TypeScript contract. |

Configuration hints

Use a long random service token for bearerToken (from env). Business metrics: pass JSON as a string in businessMetricsJson or set it from env in your app. Tune probeTimeoutMs / collectionTimeoutMs if probes are slow.

License

ISC — see LICENSE.