Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/oak_nest/modules/redis/deps.ts>createLazyClient

Refer to nestjs to realize some common functions for Deno, support hono and oak
Latest
function createLazyClient
import { createLazyClient } from "https://deno.land/x/oak_nest@v3.0.1/modules/redis/deps.ts";

Create a lazy Redis client that will not establish a connection until a command is actually executed.

import { createLazyClient } from "./mod.ts";

const client = createLazyClient({ hostname: "127.0.0.1", port: 6379 });
console.assert(!client.isConnected);
await client.get("foo");
console.assert(client.isConnected);