0.1.3 • Published 12 years ago

resourceful-redis v0.1.3

Weekly downloads
23
License
-
Repository
github
Last release
12 years ago

#resourceful-redis Build Status

A Redis engine for resourceful, a model framework from the flatiron project.

Acknowledgement

resourceful-redis is based on all the other resourceful engines including the standard couchdb and memory engines. Also inspired by the following projects:

Example

  var resourceful = require('../lib/resourceful-redis');

  var Creature = resourceful.define('creature', function () {

    // Specify redis engine and connection
    this.use("redis", {
      uri: "redis://DB:Pass@127.0.0.1:6379", // Set connection string here, auth is optional
      namespace: "<KEY TO USE AS NAMESPACE>" // Each model will have a different namespace to use as a key
    });

    // Specify some properties
    this.string('diet');
    this.bool('vertebrate');
    this.array('belly');

    this.timestamps();
  });

  Creature.prototype.feed = function (food) {
    this.belly.push(food);
  };

Installation

Installing resourceful

  $ [sudo] npm install resourceful

Installing resourceful-redis

  $ [sudo] npm install resourceful-redis

Tests

All tests are written with mocha and should be run with npm:

  $ npm test

Author: Cody Stoltman

License: Apache 2.0

0.1.3

12 years ago

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago

0.0.1

12 years ago