There was an error while loading. Please reload this page.
1 parent 4b997c2 commit bbcff1eCopy full SHA for bbcff1e
functions/memorystore/redis/index.js
@@ -22,7 +22,13 @@ const redis = require('redis');
22
const REDISHOST = process.env.REDISHOST || 'localhost';
23
const REDISPORT = process.env.REDISPORT || 6379;
24
25
-const redisClient = redis.createClient(REDISPORT, REDISHOST);
+const redisClient = redis.createClient({
26
+ socket: {
27
+ port: REDISPORT,
28
+ host: REDISHOST,
29
+ },
30
+});
31
+redisClient.connect();
32
redisClient.on('error', err => console.error('ERR:REDIS:', err));
33
34
const incrAsync = promisify(redisClient.incr).bind(redisClient);
0 commit comments