1.0.3 • Published 1 year ago

pipe-hermes v1.0.3

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

Hermes

A light weight message broker that uses the publisher and subscriber pattern to deliver messages within services.

Installation

Install pipe-hermes with npm

npm install pipe-hermes

Usage/Examples

import Hermes from 'pipe-hermes'

Subscriber

import { HermesSubscriber } from 'pipe-hermes'

const ApplicationConfig = {
    host: 'broker.pipemessenger.xyz',
    port: 5670,
    hermesKey: '/*KEY USED BY THE ENIGMA CLI*/',
    hermesToken: '/*GENERATED BY THE ENIGMA CLI*/'
};

const subscriber = new HermesSubscriber(ApplicationConfig);

subscriber.on('add-to-cart', (message) => {
  console.log('Item added to cart:', message);
});

Publisher

import { HermesPublisher } from 'pipe-hermes'

const ApplicationConfig = {
    host: 'broker.pipemessenger.xyz',
    port: 5670,
    hermesKey: '/*KEY USED BY THE ENIGMA CLI*/',
    hermesToken: '/*GENERATED BY THE ENIGMA CLI*/'
};

const publisher = new HermesPublisher(ApplicationConfig);

publisher.deliver<string>('add-to-cart', 'Hello World!');

Documentation

Use the engima cli tool to generate your hermes token using your key

Engima CLI Tool

Tech Stack

Server: NodeJS, GoLang

🚀 About Me

I just write codes that give me headaches...

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago