redis-simple

0.0.1 • Public • Published

redis-simple Build Status

Very simple client for redis. Based on node_redis This client, contains only three commands: set, get and del for strings and hashes.

Install

npm install redis-simple

Usage

Example with strings

var redissimple = require('redis-simple');
var key = "A";
var value = "B";
var simple = redissimple();
 
simple.set(key, value, function(err, reply){
    simple.get("A", function(err, reply){
       simple.del("A", function(err, rep){
        console.log(rep);
        simple.quit();
      });
   });
});

Example with hashes

var redissimple = require('redis-simple');
var simple = redissimple();
var key = "foo";
var field = "field";
var value = "value";
 
simple.set(key, value, field, function(err, reply){
    simple.get(key, field, function(err, reply){
        simple.del(key, field, function(errdel, replydel){
            console.log(reply, replydel);
            simple.quit();
        });
    });
});

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i redis-simple

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • saromanov