HINT: When using Sentinel in Master-Slave setup, if you want to set the passwords for Master and Slave nodes, consider having the same password for them (#7292).
// app.module.tsimport{Module}from"@nestjs/common";import{RedisModule}from"@liaoliaots/nestjs-redis";@Module({imports:[RedisModule.forRoot({readyLog:true,commonOptions:{name:"mymaster",sentinels:[{host:"localhost",port:7380,},{host:"localhost",port:7381,},],sentinelPassword:"sentinel",password:"my_password",},config:[{// get master node from the sentinel grouprole:"master",namespace:"I'm master",},{// get a random slave node from the sentinel grouprole:"slave",namespace:"I'm slave",},],}),],})exportclassAppModule{}