impl redis cloud
This commit is contained in:
7
src/core/configs/cache/redis.provider.ts
vendored
7
src/core/configs/cache/redis.provider.ts
vendored
@@ -6,9 +6,10 @@
|
||||
provide: 'REDIS_CLIENT',
|
||||
useFactory: (configService: ConfigService) => {
|
||||
const redis = new Redis({
|
||||
host: configService.get<string>('REDIS_HOST', '10.1.1.109'),
|
||||
port: configService.get<number>('REDIS_PORT', 6379),
|
||||
// password: configService.get<string>('REDIS_PASSWORD', ''),
|
||||
host: configService.get<string>('REDIS_HOST', 'redis-17317.crce181.sa-east-1-2.ec2.redns.redis-cloud.com'),
|
||||
port: configService.get<number>('REDIS_PORT', 17317),
|
||||
username: configService.get<string>('REDIS_USERNAME', 'default' ),
|
||||
password: configService.get<string>('REDIS_PASSWORD', 'd8sVttpJdNxrWjYRK43QGAKzEt3I8HVc'),
|
||||
});
|
||||
|
||||
redis.on('error', (err) => {
|
||||
|
||||
Reference in New Issue
Block a user