Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
redis/templates/config.txt
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
46 lines (43 sloc)
1.37 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Config source: https://git.io/JemcF | |
* | |
* Feel free to let us know via PR, if you find something broken in this config | |
* file. | |
*/ | |
import Env from '@ioc:Adonis/Core/Env' | |
import { redisConfig } from '@adonisjs/redis/build/config' | |
/* | |
|-------------------------------------------------------------------------- | |
| Redis configuration | |
|-------------------------------------------------------------------------- | |
| | |
| Following is the configuration used by the Redis provider to connect to | |
| the redis server and execute redis commands. | |
| | |
| Do make sure to pre-define the connections type inside `contracts/redis.ts` | |
| file for AdonisJs to recognize connections. | |
| | |
| Make sure to check `contracts/redis.ts` file for defining extra connections | |
*/ | |
export default redisConfig({ | |
connection: Env.get('REDIS_CONNECTION'), | |
connections: { | |
/* | |
|-------------------------------------------------------------------------- | |
| The default connection | |
|-------------------------------------------------------------------------- | |
| | |
| The main connection you want to use to execute redis commands. The same | |
| connection will be used by the session provider, if you rely on the | |
| redis driver. | |
| | |
*/ | |
local: { | |
host: Env.get('REDIS_HOST'), | |
port: Env.get('REDIS_PORT'), | |
password: Env.get('REDIS_PASSWORD', ''), | |
db: 0, | |
keyPrefix: '', | |
}, | |
}, | |
}) |