thug-redis

A set of redis methods for thug models

thug-redis

A collection of thug filters and validations that leverage redis.

creates a model counter that starts a 1001.

var Thug = require('thug');
var redisDb = require('thug-redis');
 
module.exports = function(config) {
  var redis = redisDb(config.redis);
  var redis.seed(1000);
  
  var widget = new Thug({
    filters: {
      in: [redis.counter('foo')]
    }
  });
  
  return widget;
}

TODO

  • unique validation
  • document grouping
  • reds search