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
Report incidents, update status, and send heartbeats — from any Node.js or TypeScript application. Zero dependencies.
$ npm install @beacon-status/node
Quick Start
npm install @beacon-status/node
Add your credentials to .env
BEACON_API_TOKEN=your-token
BEACON_URL=https://usebeacon.pro
BEACON_PAGE_SLUG=main
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
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.',
});
await beacon.updateComponent(componentId, {
status: 'degraded_performance',
});
await beacon.resolveIncident(incidentId,
'Webhook delivery restored.'
);
import cron from 'node-cron';
cron.schedule('0 * * * *', async () => {
await processInvoices();
await beacon.heartbeat('invoice-processing-token');
});
app.use((err, req, res, next) => {
if (err.critical) {
beacon.createIncident({
title: `Critical: ${err.message}`,
impact: 'critical',
});
}
next(err);
});
Features
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.
Install the package, add your token, and ship status updates from your codebase.
Also available: Laravel →
We use essential cookies for sign-in and security. Cookie policy