MagicBell WebPush Library
This package provides a convenient interface to subscribe to browser/web push notifications using MagicBell.
Installation
Install the package with npm:
npm install @magicbell/webpush --save
or yarn:
yarn add @magicbell/webpush
Usage
import { subscribe } from '@magicbell/webpush';
subscribe({
token: 'jwt-token',
host: 'https://api.magicbell.com',
});
Options
token String
The JWT token you received from the MagicBell API. This token is used to authenticate the request.
host String
Optional. The host of the MagicBell API. Defaults to https://api.magicbell.com
.
Support
New features and bug fixes are released on the latest major version of the magicbell
package. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
Credits
Credit where credits due, this package is inspired by and based on the Stripe Node.js SDK.