paperboy-communicator

1.1.0 • Public • Published

Paperboy

Build Status Maintainability Test Coverage

An intersystem communicator

gif

Install Module

npm install paperboy-communicator

Install Prerequisites

⬡ Redis - redis.io

Redis stores, retrieves, and communicates between Node proceseses. It performs these tasks very reliably and quicky! You can try Redis here!

Set the PAPERBOY_REDIS_URL in your .env file (or don't and paperboy will use your local Redis server by default)

Use

Example: Paperboy can be used for data storage

const Paperboy = require(`paperboy-communicator`);
const paperboy = new Paperboy({connectionName: `data-example`});
paperboy.push(`example`, `Hello World!`);
paperboy.pull(`example`)
 .then((result) => {
    console.log(result); // "Hello World!" is logged to the console
 });

Example: Paperboy can be used as a publish/subscribe service

const Paperboy = require(`paperboy-communicator`);
const paperboy = new Paperboy({connectionName: `pubsub-example`});
paperboy.on(`my-event`, (data) => {
  console.log(data); // "Hello World!" is logged to the console
});
 
paperboy.trigger(`my-event`, `Hello World!`);

Readme

Keywords

Package Sidebar

Install

npm i paperboy-communicator

Weekly Downloads

5

Version

1.1.0

License

MIT

Unpacked Size

463 kB

Total Files

31

Last publish

Collaborators

  • altereagle