LeagueStats/server/config/redis.js

65 lines
1.5 KiB
JavaScript
Raw Normal View History

2019-12-01 15:20:27 +00:00
'use strict'
/*
|--------------------------------------------------------------------------
| Redis Configuaration
|--------------------------------------------------------------------------
|
| Here we define the configuration for redis server. A single application
| can make use of multiple redis connections using the redis provider.
|
*/
const Env = use('Env')
module.exports = {
/*
|--------------------------------------------------------------------------
| connection
|--------------------------------------------------------------------------
|
| Redis connection to be used by default.
|
*/
connection: Env.get('REDIS_CONNECTION', 'local'),
/*
|--------------------------------------------------------------------------
| local connection config
|--------------------------------------------------------------------------
|
| Configuration for a named connection.
|
*/
local: {
host: Env.get('REDIS_HOST', '127.0.0.1'),
port: Env.get('REDIS_PORT', 6379),
password: Env.get('REDIS_PASSWORD', null),
2019-12-01 15:20:27 +00:00
db: 0,
keyPrefix: ''
},
/*
|--------------------------------------------------------------------------
| cluster config
|--------------------------------------------------------------------------
|
| Below is the configuration for the redis cluster.
|
*/
cluster: {
clusters: [{
host: '127.0.0.1',
port: 6379,
password: null,
db: 0
},
{
host: '127.0.0.1',
port: 6380,
password: null,
db: 0
}]
}
}