Reference
Configuration
Server options, defaults, and the public package entry points.
Create one betterPush() instance on the server, export it for application code,
and mount its handler in your framework. The database, providers, and session
resolver are required; queues, caches, notification definitions, maintenance,
and operational controls are optional.
import { betterPush } from "@better-push/core";
export const push = betterPush({
database,
providers,
session,
});Server options
Prop
Type
Package entry points
Import integrations from their subpaths so your application loads only the code and optional peer dependencies it uses.
| Purpose | Entry points |
|---|---|
| Database | @better-push/core/adapters/postgres, /drizzle, /prisma |
| Providers | @better-push/core/providers/web-push, /fcm, /apns, /expo, /emulator |
| Frameworks | @better-push/core/nextjs, /tanstack, /express, /hono, /nestjs, /node |
| Delivery | @better-push/core/queue/db-queue, /bullmq |
| Cache | @better-push/core/cache/memory, /redis |
| Clients | @better-push/core/client, /react, /native |
| Tools | @better-push/core/studio, /emulator, /stats |
The relevant guide documents each subpath's setup and options. See database adapters, providers, async delivery, cache, and the framework walkthroughs.