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_BASE_URL=https://api.beacon.example.com
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_BASE_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',
});
await beacon.resolveIncident(incidentId,
'Webhook delivery restored.'
);
import cron from 'node-cron';
cron.schedule('0 * * * *', async () => {
await processInvoices();
await beacon.heartbeat('invoice-processing-token');
});
import { beaconHealthCheck } from '@beacon-status/node/express';
app.get('/health', beaconHealthCheck(beacon));
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
Exponential backoff on transient failures out of the box.
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