Node.js based forum software built for the modern web
read redis host just before connecting
barisusakli90f5683cc29f
diff --git a/src/database/redis.js b/src/database/redis.jsindex 917dd01d19..ea73f929bb 100644--- a/src/database/redis.js+++ b/src/database/redis.js@@ -6,7 +6,6 @@nconf = require('nconf'),path = require('path'),express = require('express'),- redis_socket_or_host = nconf.get('redis:host'),utils = require('./../../public/src/utils.js'),redis,connectRedis,@@ -48,6 +47,8 @@process.exit();}+ var redis_socket_or_host = nconf.get('redis:host');+if (redis_socket_or_host && redis_socket_or_host.indexOf('/')>=0) {/* If redis.host contains a path name character, use the unix dom sock connection. ie, /tmp/redis.sock */redisClient = redis.createClient(nconf.get('redis:host'));@@ -106,7 +107,7 @@module.close = function() {redisClient.quit();};-+module.helpers = module.helpers || {};module.helpers.redis = require('./redis/helpers');}(exports));