A NestJS module wrapping ioredis for Redis integration. Version 0.1.8 is current as of 2023, with limited release cadence (latest release over a year ago). It provides a declarative @RedisModule for root configuration and async factory, plus @InjectRedisClient decorator to inject named Redis clients. Differentiator: integrates deeply with NestJS DI and supports multiple connection instances via name tokens. Note: package name is 'nestjs-ioredis' but GitHub repo is 'nest-redis'. There is no official stable release beyond 0.x and no breaking change policy is documented.
npm install nestjs-ioredisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Registers Redis with a single connection using forRoot() with host, port, and optional password from env.
Wrap single config in array: forRoot([{...}]) or use spread. The README shows both forms, but array is required.Use forAsync({}, { useFactory, inject }) - first argument must be empty object, not omitted.Use explicit 'name' property in config, then inject with that name. Name '0' is reserved for the default connection.
Use `import Redis from 'ioredis'` and type as `Redis` not `Redis.Redis`.
npm install nestjs-ioredis and ensure tsconfig.json includes node_modules types.
Use import { RedisModule } from 'nestjs-ioredis';Check REDIS_HOST and REDIS_PORT env vars, or start Redis locally.