Home

Awesome

YoRedis

A minimalistic Redis client using modern Node.js.

Motivation

The goal is to write a minimal Redis client that:

Usage

Basic usage:

const YoRedis = require('yoredis');

const redis = new YoRedis({ url: 'redis://127.0.0.1:6379' });

redis.call('ping')
  .then(function(reply) {
    console.log(reply);
  });

With dynamic, async configuration using Vaulted:

const redis = new YoRedis(function() {
  return vault.read({ id: 'redis/production' })
    .then(function(secret) {
      return {
        url: secret.url
      };
    });
});

redis.call('ping')
  .then(function(reply) {
    console.log(reply);
  });

Pipelining

redis.callMany([ [ 'ping' ], [ 'set', 'foo', 'bar' ], [ 'get', 'foo' ] ])
  .then(function(replies) {
    // replies is:
    // [
    //   'PONG',
    //   'OK',
    //   'bar'
    // ]
  })

Roadmap