Socket
Socket
Sign inDemoInstall

egg-redis

Package Overview
Dependencies
25
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.1.0

1

config/config.default.js

@@ -12,2 +12,3 @@ 'use strict';

supportTimeCommand: true,
// Redis: require('ioredis'), // customize ioredis version, only set when you needed

@@ -14,0 +15,0 @@ // Single Redis

2.1.0 / 2018-11-28
==================
**features**
* [[`ee3fda1`](http://github.com/eggjs/egg-redis/commit/ee3fda1f95a178a6120fe32141c903d19f7f5ecb)] - feat: support customize ioredis version (#21) (Yiyu He <<dead_horse@qq.com>>)
2.0.1 / 2018-11-28

@@ -3,0 +9,0 @@ ==================

2

lib/redis.js
'use strict';
const assert = require('assert');
const Redis = require('ioredis');

@@ -12,2 +11,3 @@ module.exports = app => {

function createClient(config, app) {
const Redis = app.config.redis.Redis || require('ioredis');
let client;

@@ -14,0 +14,0 @@

{
"name": "egg-redis",
"version": "2.0.1",
"version": "2.1.0",
"description": "Redis plugin for egg",

@@ -5,0 +5,0 @@ "eggPlugin": {

@@ -88,5 +88,5 @@ # egg-redis

$vim /etc/redis/redis.conf
$vim /etc/redis/redis.conf
requirepass xxxxxxxxxx // xxxxxxxxxx是你的密码
requirepass xxxxxxxxxx // xxxxxxxxxx is your password

@@ -104,2 +104,19 @@ ```

### Customize `ioredis` version
`egg-redis` using ioredis@3 now, if you want to upgrade your ioredis, you can pass the instance by `config.redis.Redis`:
```js
// config/config.default.js
config.redis = {
Redis: require('ioredis'), // customize ioredis version, only set when you needed
client: {
port: 6379, // Redis port
host: '127.0.0.1', // Redis host
password: 'auth',
db: 0,
},
}
```
## Usage

@@ -106,0 +123,0 @@

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