Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 

README.md

SSDB NodeJS 客户端

  1. 基于https://github.com/eleme/node-ssdb 改写;
  2. 主要是修复了上述客户端的请求和应答对应错误的问题;
  3. 添加自动重连机制,可通过autoReconnect关闭;
npm install ssdb-node --save

Example

'use strict';
const co = require('co');
const ssdb = require("ssdb-node");
const options = {
    host: '127.0.0.1',
    port: 8888,
    promisify: true,
    size: 3,
    logger: undefined,
    autoReconnect: true
};

let client = new ssdb(options);


function* main() {
    console.info(yield Promise.all([
        client.hget("test-ssdb-client", "key1"),
        client.hget("test-ssdb-client", "key2"),
        client.hget("test-ssdb-client", "key1"),
        client.hget("test-ssdb-client", "key1"),
        client.hget("test-ssdb-client", "key1"),
        client.hget("test-ssdb-client", "key1"),
        client.hget("test-ssdb-client", "key2"),
        client.hget("test-ssdb-client", "key1"),
        client.hget("test-ssdb-client", "key1")
    ]).catch(function (error) {
        console.error(error)
    }));
}

co(main());

About

ssdb NodeJs client for

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.