1.0.2 • Published 1 year ago

pushmifliminotif v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

pushmifliminotif

A Node.js package for sending push notifications via Firebase Cloud Messaging (FCM) API.

Installation

npm i pushmifliminotif
yarn add pushmifliminotif

Usage

const pushNotification = require('pushmifliminotif');

const serverKey = 'YOUR_SERVER_KEY';
const deviceToken = 'DEVICE_TOKEN';
const title = 'New message';
const body = 'You have a new message from John';
const icon = '/images/profile_picture.jpg';
const clickAction = 'https://example.com/messages';

pushNotification.sendNotification(serverKey, deviceToken, title, body, icon, clickAction)
  .then(response => console.log(response))
  .catch(error => console.error(error));
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago