Socket
Socket
Sign inDemoInstall

seneca-redis-store

Package Overview
Dependencies
7
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    seneca-redis-store

Redis storage layer for Seneca framework


Version published
Weekly downloads
10
decreased by-72.97%
Maintainers
5
Install size
1.62 MB
Created
Weekly downloads
 

Changelog

Source

1.1.0 26-08-2016

  • Updated dependencies
  • Added Seneca 3 and Node 6 support
  • Dropped Node 0.10, 0.12, 5 support

Readme

Source

Seneca

A Seneca.js data storage plugin

seneca-redis-store

npm version Build Status Coveralls Dependency Status Gitter

Description

A storage engine that uses redis to persist data.

seneca-redis-store's source can be read in an annotated fashion by,

  • running npm run annotate
  • viewing online.

The annotated source can be found locally at ./doc/redis-store.html.

If you're using this module, and need help, you can:

If you are new to Seneca in general, please take a look at senecajs.org. We have everything from tutorials to sample apps to help get you up and running quickly.

Seneca compatibility

Supports Seneca versions 1.x - 3.x

Install

To install, simply use npm. Remember you will need to install Seneca.js if you haven't already.

npm install seneca
npm install seneca-redis-store

You also need redis running locally. Please visit redis for more info about how to install and run redis

Quick Example

String Uri

var opts = {
  'redis-store': 'redis://user:pass@host:port'
}

String Uri with Redis Options

var opts = {
  'redis-store': {
    uri: 'redis://user:pass@host:port',
    options: {...}
  }
}

seneca.use('redis-store', opts);

seneca.ready(function() {
  var apple = seneca.make$('fruit')
  apple.name = 'Pink Lady'
  apple.price = 0.99
  apple.save$(function (err, apple) {
    console.log("apple.id = " + apple.id)
  })
})

See the full list of available Redis options.

Usage

You don't use this module directly. It provides an underlying data storage engine for the Seneca entity API:

var entity = seneca.make$('typename')
entity.someproperty = "something"
entity.anotherproperty = 100

entity.save$(function (err, entity) { ... })
entity.load$({id: ... }, function (err, entity) { ... })
entity.list$({property: ... }, function (err, entity) { ... })
entity.remove$({id: ... }, function (err, entity) { ... })

Contributing

The Senecajs org encourage open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.

Test

To run tests, simply use npm:

npm run test

License

Copyright (c) 2016, Marius Ursache and other contributors. Licensed under MIT.

Keywords

FAQs

Last updated on 26 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc