Beacon

Not yet published to npm. Install it from GitHub for now. The examples below are an overview; the docs page has the current API and install steps. Installation instructions

Integration

Beacon for Node.js

Report incidents, update status, and send heartbeats — from any Node.js or TypeScript application. Zero dependencies.

$ npm install @beacon-status/node

Quick Start

Up and running in three steps

1

Install

npm install @beacon-status/node
2

Configure

Add your credentials to .env

BEACON_API_TOKEN=your-token
BEACON_URL=https://usebeacon.pro
BEACON_PAGE_SLUG=main
3

Initialize

Create a Beacon client instance

import { Beacon } from '@beacon-status/node';

const beacon = new Beacon({
  token: process.env.BEACON_API_TOKEN!,
  baseUrl: process.env.BEACON_URL,
  pageSlug: process.env.BEACON_PAGE_SLUG!,
});

Code Examples

TypeScript-first, always

Report an Incident

Create an incident on your status page from anywhere in your app.

await beacon.createIncident({
  title: 'Payment processing delays',
  impact: 'major',
  state: 'investigating',
  message: 'Stripe webhook delivery is delayed.',
});

Update Component Status

await beacon.updateComponent(componentId, {
  status: 'degraded_performance',
});

Resolve an Incident

await beacon.resolveIncident(incidentId,
  'Webhook delivery restored.'
);

Heartbeat

import cron from 'node-cron';

cron.schedule('0 * * * *', async () => {
  await processInvoices();
  await beacon.heartbeat('invoice-processing-token');
});

Error Handler

app.use((err, req, res, next) => {
  if (err.critical) {
    beacon.createIncident({
      title: `Critical: ${err.message}`,
      impact: 'critical',
    });
  }
  next(err);
});

Features

Built for the Node.js ecosystem

TypeScript-first

Full type definitions included. No @types package needed.

Framework-agnostic

Works with Express, Fastify, Next.js, NestJS, and more.

Automatic retries

429s honour Retry-After; GETs retry on 5xx and network errors.

Zero dependencies

Uses native fetch. No bloat in your node_modules.

ESM + CommonJS

Dual-format package. Import or require — both work.

Start monitoring your Node.js app

Install the package, add your token, and ship status updates from your codebase.

Also available: Laravel →