CLI fail to make redis connection on secure TLS connection
Add conf for tls
om CLI commands.
const redisConfig = config.get('isbn:redis');
if (redisConfig.tls) {
const tls = redisConfig.tls;
if (tls.keyFile) {
tls.key = fs.readFileSync(tls.keyFile);
delete tls.keyFile;
}
if (tls.certFile) {
tls.cert = fs.readFileSync(tls.certFile);
delete tls.certFile;
}
if (tls.caFiles) {
tls.ca = tls.caFiles.map(file => fs.readFileSync(file));
delete tls.caFiles;
}
}
// init redis
const redisClient = redis.createClient(redisConfig);
Edited by Tarje Sælen Lavik