Skip to content

Commit

Permalink
docs(example): add example config
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jul 9, 2016
1 parent 671439b commit fed3744
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions examples/redis.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
'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: '127.0.0.1',
port: 6379,
password: null,
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
}]
}


}

0 comments on commit fed3744

Please sign in to comment.