1.0.6 • Published 7 years ago

redis-await v1.0.6

Weekly downloads
6
License
ISC
Repository
github
Last release
7 years ago

redis-await

light weight and high performance async nodejs redis client! support await

npm.io

Installation

npm install redis-await

Usage

const RedisClient = require('redis-await');

(async function () {

    let client = new RedisClient(/*{ host: '127.0.0.1', port: 6379, pool: 2 }*/);
    let value;
    
    await client.ready();
    
    value = await client.hset('test', 'key', '123\r\n456');
    value = await client.hget('test', 'key');

    value = await client.hmset('test', { key1: 1, key2: 2 });
    value = await client.hmget('test', 'key1', 'key2');

    value = await client.hgetall('test');

    //use command
    value = await client.command('HGETALL', 'test');

    //direct send redis instruction
    value = await client.send('*2\r\n$7\r\nHGETALL\r\n$4\r\ntest\r\n');

})();
1.0.6

7 years ago

1.0.5

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago