Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connect-redis

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-redis - npm Package Compare versions

Comparing version 1.4.7 to 1.5.0

13

History.md

@@ -0,3 +1,14 @@

1.5.0 / 2014-03-06
==================
* update to express 4x
1.4.7 / 2014-03-06
==================
* allow redis url
1.4.6 / 2013-11-13
==================
* lazy load redis. fixes #56

@@ -4,0 +15,0 @@ * update redis to 0.9.0

10

lib/connect-redis.js

@@ -20,5 +20,5 @@ /*!

/**
* Return the `RedisStore` extending `connect`'s session Store.
* Return the `RedisStore` extending `express`'s session Store.
*
* @param {object} connect
* @param {object} express session
* @return {Function}

@@ -28,9 +28,9 @@ * @api public

module.exports = function(connect){
module.exports = function(session){
/**
* Connect's Store.
* Express's session Store.
*/
var Store = connect.session.Store;
var Store = session.Store;

@@ -37,0 +37,0 @@ /**

{
"name": "connect-redis",
"description": "Redis session store for Connect",
"version": "1.4.7",
"version": "1.5.0",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -9,3 +9,3 @@ "main": "./index.js",

"dependencies": { "redis": "0.10.x", "debug": "*" },
"devDependencies": { "connect": "*" },
"devDependencies": { "express-session": "*" },
"engines": { "node": "*" },

@@ -12,0 +12,0 @@ "bugs": {

@@ -5,3 +5,3 @@ # Connect Redis

connect-redis `>= 1.0.0` support only connect `>= 1.0.0`.
connect-redis `>= 1.0.0` support only express `>= 4.0.0`.

@@ -26,17 +26,12 @@ ## Installation

Due to npm 1.x changes, we now need to pass connect to the function `connect-redis` exports in order to extend `connect.session.Store`:
Due to express 4.x.x changes, we now need to pass express-session to the function `connect-redis` exports in order to extend `express-session.Store`:
var connect = require('connect')
, RedisStore = require('connect-redis')(connect);
var session = require('express-session')
, RedisStore = require('connect-redis')(session);
connect()
.use(connect.session({ store: new RedisStore(options), secret: 'keyboard cat' }))
app.use(session({ store: new RedisStore(options), secret: 'keyboard cat' }))
This means express users may do the following, since `express.session.Store` points to the `connect.session.Store` function:
var RedisStore = require('connect-redis')(express);
# License
MIT

@@ -7,4 +7,4 @@

var assert = require('assert')
, connect = require('connect')
, RedisStore = require('./')(connect);
, session = require('express-session')
, RedisStore = require('./')(session);

@@ -11,0 +11,0 @@ var store = new RedisStore;

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc