NestJS integration for power-redis, providing a secure, scalable, and production-ready Redis client wrapper with multi-connection support, TLS, and high-performance helpers. Current stable version is 1.0.18, actively maintained. It supports defining multiple named Redis connections via environment variables, auto-loading TLS certificates, and exposes utilities like bulk operations, scanning, and TTL management. Key differentiators: seamless NestJS module integration with @InjectRedis and RedisService dependency injection; supports arbitrary connection names; zero-configuration setup via .env. Designed for Node.js >=14 and ships TypeScript definitions.
npm install nestjs-power-redisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Register a Redis connection named 'queues' via environment variables and inject it into a service for basic get/set operations.
Rename env vars to use REDIS_<NAME>_HOST format (e.g., REDIS_QUEUES_HOST).
Switch to RedisModule.forRoot(['name1', 'name2']) and configure via environment variables.
Ensure connection names follow the regex [a-zA-Z_-]+.
Set all three TLS env vars or none.
Replace redis.set() with redis.setOne().
Use `import { RedisModule } from 'nestjs-power-redis'` instead of `import RedisModule from ...`.Run `npm install nestjs-power-redis` and ensure tsconfig.json includes `"moduleResolution": "node"`.
Start Redis server or update REDIS_<NAME>_HOST and REDIS_<NAME>_PORT in .env.