@@ -123,6 +123,11 @@ http:
|
||||
|
||||
# Connection to the Redis server.
|
||||
redis:
|
||||
# Unix sockets can be used
|
||||
#
|
||||
# Default: undefined
|
||||
#socket: /var/run/redis/redis.sock
|
||||
|
||||
# Syntax: redis://[db[:password]@]hostname[:port][/db-number]
|
||||
#
|
||||
# Default: redis://localhost:6379/0
|
||||
|
||||
14
src/xo.js
14
src/xo.js
@@ -44,11 +44,15 @@ export default class Xo extends EventEmitter {
|
||||
this._httpRequestWatchers = createRawObject()
|
||||
|
||||
// Connects to Redis.
|
||||
const redisConf = config.redis
|
||||
this._redis = createRedisClient(redisConf && {
|
||||
rename_commands: redisConf.renameCommands,
|
||||
url: redisConf.uri
|
||||
})
|
||||
{
|
||||
const {
|
||||
renameCommands: rename_commands,
|
||||
socket: path,
|
||||
uri: url
|
||||
} = config.redis || {}
|
||||
|
||||
this._redis = createRedisClient({ path, rename_commands, url })
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user