Notification service for engined, used to send notification in backend.
Install via NPM:
npm install engined-notification
Start engined-notification service in engined, see example below:
const { Manager } = require('engined');
const NotificationService = require('engined-notification');
const notification = NotificationService();
const main = async () => {
// Create manager
let serviceManager = new Manager({ verbose: true });
// Adding service to manager
serviceManager.add('Notification', notification);
// Start all services
await serviceManager.startAll();
};
main();
Here is example to get agent for specific backend to save file:
// Using local notification backend
let localAgent = this.getContext('Notification').getAgent('local');
// Register notification backend
this.getContext('Notification').registerAgent('local', agent);
Licensed under the MIT License
Copyright(c) 2017 Leon Lin(林為志) <leonlin14@gmail.com>