Skip to main content
Home

@nest/redis@0.0.3
Built and signed on GitHub Actions

It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
58%
Published
9 months ago (0.0.3)

@nest/redis

This is a redis module for deno_nest. The default redis client is npm:@redis/client@^1.

example

Add import map in deno.json:

{
  "imports": {
    "@nest/core": "jsr:@nest/core@^0.0.1",
    "@nest/hono": "jsr:@nest/hono@^0.0.1",
    "@nest/redis": "jsr:@nest/redis@^0.0.2",
  }
}

app.module.ts:

import { Module } from "@nest/core";
import { createStore, RedisModule } from "@nest/redis";
import { CacheModule } from "@nest/cache";
import { AppController } from "./app.controller.ts";

@Module({
  imports: [
    RedisModule.forRoot({
      url: "redis://default:xxx@10.100.30.65:6379/1",
    }),
    CacheModule.register({
      ttl: 30,
      store: createStore,
      isDebug: true,
    }),
  ],
  controllers: [AppController],
})
export class AppModule {}

Then can be used in AppController:

import { Controller, Get, Inject, UseInterceptors } from "@nest/core";
import { CacheInterceptor, SetCacheStore } from "@nest/cache";
import { type Redis, REDIS_KEY, RedisService } from "@nest/redis";

@Controller("")
export class AppController {
  constructor(private readonly redisService: RedisService) {}
  @Get("/")
  version() {
    this.redisService.set("version", "1.0.0");
    return this.redisService.get("version");
  }
}

More can see the example dir.

Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@nest/redis

Import symbol

import * as redis from "@nest/redis";
or

Import directly with a jsr specifier

import * as redis from "jsr:@nest/redis";

Add Package

pnpm i jsr:@nest/redis
or (using pnpm 10.8 or older)
pnpm dlx jsr add @nest/redis

Import symbol

import * as redis from "@nest/redis";

Add Package

yarn add jsr:@nest/redis
or (using Yarn 4.8 or older)
yarn dlx jsr add @nest/redis

Import symbol

import * as redis from "@nest/redis";

Add Package

vlt install jsr:@nest/redis

Import symbol

import * as redis from "@nest/redis";

Add Package

npx jsr add @nest/redis

Import symbol

import * as redis from "@nest/redis";

Add Package

bunx jsr add @nest/redis

Import symbol

import * as redis from "@nest/redis";