Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 2, 2024 via pnpm

connect-redis 7.1.0

Redis session store for Connect
Package summary
Share
0
issues
1
license
12
MIT
Package created
20 Dec 2010
Version published
11 May 2023
Maintainers
3
Total deps
12
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
12 Packages, Including:
connect-redis@7.1.0
cookie-signature@1.0.7
cookie@0.6.0
debug@2.6.9
depd@2.0.0
express-session@1.18.0
ms@2.0.0
on-headers@1.0.2
parseurl@1.3.3
random-bytes@1.0.0
safe-buffer@5.2.1
uid-safe@2.1.5
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of connect-redis 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
express-session1.18.022.25 kBMIT
prod peer

Visualizations

Frequently Asked Questions

What does connect-redis do?

Connect-Redis is a package that provides Redis session storage for Express, a popular Node.js framework. With Connect-Redis, you can store your Express server session data in a Redis database, making it accessible across multiple server instances, improving your app's scalability, and providing an extra layer of user-data persistence.

How do you use connect-redis?

To use Connect-Redis as your Express session store, you'll need to install the package and a Redis driver such as redis or ioredis as well as express-session. You can install these with npm using the following commands:

npm install redis connect-redis express-session

or

npm install ioredis connect-redis express-session

Then require or import the package in your app's configuration:

import RedisStore from "connect-redis"

or

const RedisStore = require("connect-redis").default

Set up and connect your Redis client:

import {createClient} from "redis"

let redisClient = createClient()
redisClient.connect().catch(console.error)

Initialize a new RedisStore with your client:

let redisStore = new RedisStore({
  client: redisClient,
  prefix: "myapp:",
})

Then use the store in your Express session setup:

import session from "express-session"

app.use(
  session({
    store: redisStore,
    resave: false,
    saveUninitialized: false,
    secret: "keyboard cat",
  })
)

Where are the connect-redis docs?

The Connect-Redis documentation is available on the package's GitHub repository. Among other details, it provides guidelines for configuring the RedisStore, including how to set key prefixes, handle session data lifetime (TTL), use custom serializers, and manage store behavior such as touch sessions and key expiration.