Skip to content

nest-redis 0.0.1

Install from the command line:
Learn more about npm packages
$ npm install @chqrd/nest-redis@0.0.1
Install via package.json:
"@chqrd/nest-redis": "0.0.1"

About this version

nest-redis

This NestJS module adds a Redis connection to your project.

Installation

import { HealthModule } from "@chqrd/nest-health";
import { Module } from "@nestjs/common";

@Module({
  imports: [
    RedisModule.registerAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: async (config) => ({ url: config.getOrThrow("REDIS_URL", "redis://localhost:6379") }),
    }),
  ],
})
export class AppModule {}
@Injectable()
export class RequestService {
  constructor(private readonly redis: RedisService) {}

  async getValue() {
    return await this.redis.client.get("my_key");
  }
}

Project setup

$ npm install

Compile and run the project

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Details


Assets

  • nest-redis-0.0.1.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all