A NestJS module for Redis with some extra features such as:
This module uses
ioredis
,@socket.io/redis-emitter
and@socket.io/redis-adapter
to connect to Redis.
npm i nestjs-redis-plus ioredis socket.io @nestjs/websockets @nestjs/platform-socket.io @socket.io/redis-adapter @socket.io/redis-emitter
// app.module.ts
import { Module } from "@nestjs/common";
import { RedisModule } from "nestjs-redis-plus";
@Module({
imports: [
RedisModule.forRoot(),
/* Multiple connections */
RedisModule.forRoot({
name: "Secondary",
host: "localhost",
port: 6379,
}),
],
})
export class AppModule {}