connect-redis
Advanced tools
Comparing version 1.4.7 to 1.5.0
@@ -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 |
@@ -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; |
20216
36