Skip to main content

Getting Started

Prerequisites

Installation

git clone https://github.com/sagelga/statuspage-pulse.git
cd statuspage-pulse
npm install

Create the R2 Bucket

wrangler r2 bucket create statuspage-data

Local Development

npm run dev

Starts a local worker with simulated cron triggers.

To manually trigger a check during local dev:

curl -X POST http://localhost:8787/trigger

Type Checking

npm run typecheck

Deployment

npm run deploy

The cron trigger (every minute) activates automatically after deployment.

View Logs

npm run tail

Configuration

Environment variables in wrangler.toml:

VariableDefaultDescription
TIMEOUT_MS5000Request timeout in milliseconds
DEGRADED_THRESHOLD_MS1500Response time threshold for degraded status

Adding a New Service

Add an entry to the SERVICES array in src/config.ts. Use the jsonStatus field for services that expose a structured status API.

Source Files

FilePurpose
src/types.tsType definitions
src/config.tsService definitions and monitoring URLs
src/worker.tsHealth check logic, R2 reads/writes, HTTP handlers