redis-shard-api

A pure Javascript port version of Python's RedisShardAPI

npm install redis-shard-api
23 downloads in the last week
50 downloads in the last month

redis-shard-api

A pure Javascript port version of Python's RedisShardAPI

install

npm install redis-shard-api

Usage

Simple example, include as example/client.js

var RedisShard = require('redis-shard-api');

var servers = [
  {'name':'node1','host':'127.0.0.1','port':6379,'db':0},
  {'name':'node2','host':'127.0.0.1','port':6380,'db':0},
  {'name':'node3','host':'127.0.0.1','port':6381,'db':0},
  {'name':'node4','host':'127.0.0.1','port':6382,'db':0}
];

var redis = new RedisShard(servers);

redis.set("test1", "1234");

redis.get("test1", function(err, result){
  console.log(result);
});

This will display:

1234

LICENSE - "MIT"

npm loves you