A light weight message broker that uses the publisher and subscriber pattern to deliver messages within services.
Install pipe-hermes with npm
npm install pipe-hermesimport Hermes from 'pipe-hermes'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);
});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!');Use the engima cli tool to generate your hermes token using your key
Server: NodeJS, GoLang
I just write codes that give me headaches...