redis-repository

1.2.2 • Public • Published

Redis Repository

A simple repository structure using redis as the underlying storage.

Usage

add redis-repository to your package.json and import the redisRepositoryFactory:

var redisRepositoryFactory = require('redis-repository'),

creating a new set

var catRepository = redisRepository.create(connectionString,'cat');

Adding to the repository

catRepository.add({name:'trevor'},function(){ 
    console.log('cat added!');
});

Getting data from the repository

catRepository.all(function(cats){
    console.log('Look at all my kitties : ',cats);
});

Removing data from the repository

catRepository.remove({name:'trevor'},function(){ 
    console.log('cat removed!');
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.2
    1
  • 1.2.1
    1
  • 1.2.0
    1
  • 1.1.0
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i redis-repository

Weekly Downloads

5

Version

1.2.2

License

none

Last publish

Collaborators

  • benoj