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

connect-redis

Package Overview
Dependencies
Maintainers
3
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 7.0.0 to 7.0.1

5

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

@@ -49,2 +49,5 @@ "contributors": [

},
"peerDependencies": {
"express-session": ">=1"
},
"engines": {

@@ -51,0 +54,0 @@ "node": ">=16"

@@ -127,27 +127,3 @@ ![Build Status](https://github.com/tj/connect-redis/workflows/build/badge.svg?branch=master) [![npm](https://img.shields.io/npm/v/connect-redis.svg)](https://npmjs.com/package/connect-redis) [![code-style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://gitter.im/jlongster/prettier) ![Downloads](https://img.shields.io/npm/dm/connect-redis.svg)

## FAQ
#### How to log Redis errors?
```js
client.on("error", console.error)
```
#### How do I handle lost connections to Redis?
By default, the Redis client will [auto-reconnect](https://github.com/mranney/node_redis#overloading) on lost connections. But requests may come in during that time. In Express, one way you can handle this scenario is including a "session check":
```js
app.use(session(/* setup session here */))
app.use(function (req, res, next) {
if (!req.session) {
return next(new Error("oh no")) // handle error
}
next() // otherwise continue
})
```
If you want to retry, here is [another option](https://github.com/expressjs/session/issues/99#issuecomment-63853989).
[1]: https://github.com/NodeRedis/node-redis
[2]: https://github.com/luin/ioredis
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