redis-shard-api

0.0.3 • Public • Published

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"

Readme

Keywords

none

Package Sidebar

Install

npm i redis-shard-api

Weekly Downloads

21

Version

0.0.3

License

MIT

Last publish

Collaborators

  • wapj