pagerdev
v0.0.3
Published
A lightweight, developer-first notification system for TypeScript applications with first-class Next.js support. Send and manage backend notifications with batching, rate limiting, and security-first design.
Maintainers
Readme
Pager
A developer-first notification system for TypeScript applications.
Installation
npm install pagerdevUsage
1. Set up environment variables
Create a .env.local file in your Next.js project root:
PAGER_DEV_API_KEY=your-api-keySecurity Note: Keep your API key secure by only using it in server-side code.
2. Use the function in your app
import { page } from "pagerdev";
await page("User created!");Configuration Options
Notification Options
// Function signature
page(
message: string,
options?: {
notif?: boolean; // Whether to send a notification (default: true)
slack?: string; // Slack webhook URL
discord?: string; // Discord webhook URL
email?: string; // Email address to send notification to
webhook?: string; // Custom webhook URL
}
): Promise<void>