fix redis ignoring configs (fixes #41). now redis_url is used instead of redis_host and redis_port

This commit is contained in:
orenom
2022-01-13 19:39:34 +01:00
parent 0c53c2444c
commit 521eedeaf1
2 changed files with 5 additions and 18 deletions
+2 -14
View File
@@ -10,20 +10,8 @@ const bodyParser = require('body-parser')
const redis = (() => {
const redisOptions = {
host: '127.0.0.1',
port: 6379
}
if(config.redis_host) {
redisOptions.host = config.redis_host
}
if(config.redis_port && config.redis_port > 0) {
redisOptions.port = config.redis_port
}
if(config.redis_password) {
redisOptions.password = config.redis_password
url: config.redis_url,
password: config.redis_password
}
const client = r.createClient(redisOptions)