Integrations · Language

Pagerless for Node.js

One import at the top of your entry file covers any Node server. Framework hooks add the errors your framework catches itself.

Set up

npm i pagerless
import "pagerless/auto"; // first line of your server entry

Set PAGERLESS_KEY (your ingest key from the Pagerless app) in your host's environment. Without it the SDK does nothing, so local dev stays quiet.

CommonJS: require("pagerless/auto"). Or start it in code: require("pagerless").init({ service: "api" }).

What it catches

  • Uncaught exceptions and unhandled promise rejections (your process still exits as before; Pagerless flushes for up to 2 seconds first).
  • Status and latency for every route of any node:http server, using the route pattern when your framework provides one.
  • Failing calls to other services: 5xx, 429 and network errors from fetch, axios, got and the Stripe SDK. Stripe, PayPal, OpenAI, Anthropic, Supabase, Neon, Resend, Twilio and others are tagged by name.
  • A heartbeat every 60 seconds, so a silent app wakes you after 5 minutes.
  • A deploy marker when the release is known (Vercel, Railway, Render, Heroku, Fly, Cloudflare and GitHub commit variables are read automatically).

Framework hooks

Report things yourself

import { capture, event } from "pagerless";

try {
  await chargeCard(order);
} catch (err) {
  capture(err, { route: "POST /checkout", tags: { plan: "pro" } });
  throw err;
}

event({ title: "Refund queue backed up", severity: "tell" });

Settings

Environment variables
VariableDefault
PAGERLESS_KEYRequired. Without it the SDK is off.
PAGERLESS_SERVICEYour host's service name, else package.json name, else app
PAGERLESS_ENVVERCEL_ENV, RAILWAY_ENVIRONMENT_NAME or NODE_ENV, else production
PAGERLESS_RELEASEThe commit from your host's variables
PAGERLESS_DISABLED=1Turns it off

Questions

Which Node versions?

Node 18.19 or newer, ESM or CommonJS.

Will it slow my app?

Events are counted and grouped in memory and sent in batches in the background. Requests are never held up waiting for Pagerless.

Updated .

Free for you and one backup · 3 apps · no card

Sleep through the small stuff.

Run one command in your repo. Pagerless shows every change before it makes it.

npx pagerless connect