Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_nest/modules/redis/mod.ts>connect

Refer to nestjs to realize some common functions for Deno, support hono and oak
Go to Latest
function connect
Re-export
import { connect } from "https://deno.land/x/deno_nest@v3.7.1/modules/redis/mod.ts";

Connect to Redis server

Examples

Example 1

import { connect } from "./mod.ts";
const conn1 = await connect({hostname: "127.0.0.1", port: 6379}); // -> TCP, 127.0.0.1:6379
const conn2 = await connect({hostname: "redis.proxy", port: 443, tls: true}); // -> TLS, redis.proxy:443

Returns

Promise<Redis>