Home

Awesome

rlite-js

Build Status

node.js bindings for rlite. For more information about rlite, go to rlite repository

Installation

$ npm install rlite

Usage

> var rlite = require('rlite');
undefined
> var r = rlite.createClient(':memory:');
undefined
> r.command(['set', 'key', 'value'], function(err, ret) {
        if (!err) {
            r.command(['get', 'key'], function(err, ret) {
                console.log(ret)
            });
        }
});
undefined
> value

Synchronically

> var rlite = require('rlite');
undefined
> var r = rlite.createClient(':memory:');
undefined
> r.commandSync(['set', 'key', 'value']);
'OK'
> r.commandSync(['get', 'key']);
'value'