wsc-redis

1.1.1 • Public • Published

wsc-redis

A redis broker for ws-cluster. It allows you to scale ws-cluster horizontally across multiple machines.

Installation

$ npm install wsc-redis --save

Usage

var wsc = require('ws-cluster');
var Broker = require('wsc-redis');
 
var server = wsc.createServer({
    broker: new Broker(6379, 'localhost')
});

API

new Broker()

Return a redis broker instance. new Broker() accepts these arguments:

  • redis.createClient([options])
  • redis.createClient(unix_socket[, options])
  • redis.createClient(redis_url[, options])
  • redis.createClient(port[, host][, options])

The arguments will be passed to redis.createClient().

Readme

Keywords

Package Sidebar

Install

npm i wsc-redis

Weekly Downloads

1

Version

1.1.1

License

MIT

Last publish

Collaborators

  • clanfei