Skip to content

Commit d9bf7b7

Browse files
committed
fix: allow passing client as an option instead of redis
1 parent 72536cc commit d9bf7b7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ class API {
7070

7171
// Initialize redis
7272
this.client =
73-
this.config.redis === false
73+
this.config.client ||
74+
(this.config.redis === false
7475
? false
7576
: _.isPlainObject(this.config.redis)
7677
? new Redis(this.config.redis, this.logger, this.config.redisMonitor)
77-
: this.config.redis;
78+
: this.config.redis);
7879
app.context.client = this.client;
7980

8081
// Expose passport

0 commit comments

Comments
 (0)