Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

multines

Package Overview
Dependencies
3
Maintainers
1
Versions
7
Issues
File Explorer

Advanced tools

multines

Multi-process nes backend, turn nes into a fully scalable solution

    2.0.0latest

Version published
Maintainers
1
Yearly downloads
7,096
decreased by-38.75%

Weekly downloads

Readme

Source

multines  Build Status

Multi-process nes backend, turn nes into a fully scalable solution.

multines connect multiple instances of Hapi and nes through an external pub/sub broker, currently only redis and mongodb are supported.

multines is powered by MQEmitter, MQEmitterRedis and MQEmitterMongodb.

Important note: this library needs nodejs 8 or greater.

Install

npm i multines --save

Example

See the examples folder.

API

Options

  • [type] - 'redis' or 'mongodb', if nothing is specified it will use the in-memory MQEmitter
  • [mq] - an instance of MQEmitter, if you do not want to leverage the embedded constructor

The options object is passed through to MQEmitterRedis and MQEmitterMongodb, check their documentation for broker-specific config.

server.subscriptionFar(path, options)

Wrap nes server.subscription(path, options) adding the ability to receive messages from the MQEmitter-based broker.

The subscription supported is slightly different from nes, as it allows wildcards.

server.publishFar(path, message)

Publish a message to the MQEmitter-based broker.

Acknowledgements

This project was kindly sponsored by nearForm.

License

MIT

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc