siskhzoom-md-devices
v0.0.8
Published
``` npm install git+ssh://[email protected]:zoom-sis/md-devices.git --save ```
Downloads
1
Maintainers
Readme
Microserive Auth
Add private dependency from gitlab via ssh
npm install git+ssh://[email protected]:zoom-sis/md-devices.git --save
Install
npm i siskhzoom-md-devices --save
In your code
const { sendNotificationTo, init } = require('md-devices');
// you have to init
init({
app: {
jwtVerifyNameSpace: '',
publicKeyPath: '',
privateKeyPath: '',
masterAuthUrl: '',
masterClientToken: ''
},
adminFirebase: {
databaseURL: 'firebase database url',
projectId: 'firebase project id',
clientEmail: 'firebase client email',
privateKey: '-----BEGIN PRIVATE KEY-----\n<KEY>\n-----END PRIVATE KEY-----'
},
redis: {
host: '127.0.0.1',
port: 6379,
databaseIndex: 1,
password: ''
}
});
// Send notification to devices by auth ids
await sendNotificationTo(
[], // authIds
{
title: 'Zoom chat',
body: 'You have new notification'
},
{}, //payloadData follow firebase payload,
{ } //options follow firebase options
);
Set Up
Using yarn
yarn install
Using npm
npm install