Socket
Socket
Sign inDemoInstall

connect-redis

Package Overview
Dependencies
10
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    connect-redis

Redis session store for Connect


Version published
Weekly downloads
361K
decreased by-23.56%
Maintainers
1
Install size
295 kB
Created
Weekly downloads
 

Readme

Source

Connect Redis

connect-redis is a Redis session store backed by node_redis, and is insanely fast :). Requires redis >= 1.3.10 for the SETEX command.

connect-redis >= 1.0.0 support only connect >= 1.0.0.

Installation

  $ npm install connect-redis

Options

  • client An existing redis client object you normally get from redis.createClient()
  • host Redis server hostname
  • port Redis server portno
  • db Database index to use
  • pass Password for Redis authentication
  • prefix Key prefix defaulting to "sess:"
  • ... Remaining options passed to the redis createClient() method.

Usage

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:

var connect = require('connect')
 	  , RedisStore = require('connect-redis')(connect);

connect.createServer(
  connect.cookieParser(),
  // 5 minutes
  connect.session({ store: new RedisStore, 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);

FAQs

Last updated on 17 Nov 2011

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