How to connect to Redis from 3rd party client?

Related to this @patrick and @mebeingken. There is shortcoming for redis connection string.

In the meantime I have another deviation from the core.

lib/setup/redis.js

const config = require('./config');

if (config.redis) {
    const redis = require('redis');
    global.redisClient = redis.createClient(config.redis === true ? 'redis://redis' : process.env.REDIS_URL);
}

module.exports = global.redisClient;

If Wappler UI flag for redis is true it will remain the same. If not it will read from the environment variable which is what I normally use.

1 Like