0.0.1 • Published 6 years ago

@seo-booster/broker v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Broker

Description

Simple wrapper library built on top of Postal.js to acquire ability to manage publication channels more strictly. Adopted to use in SEO Booster project

Testing

npm run test

Installation

npm install @seo-booster/broker --save

Usage

const broker = require('@seo-booster/broker');

broker.init([
	'notifications',
]);

broker.publish('notifications', 'email', { to: 'user@somehost.net', subject: 'Email alert', text: 'Sample text...' });

broker.subscribe('notifications', 'email', (data) => {
	// incoming data processing routine
  console.log(data);
});