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

x/r2d2/deps.ts>connect

Lightweight Redis client library for Deno.
Go to Latest
function connect
import { connect } from "https://deno.land/x/r2d2@v0.0.10/deps.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

Parameters

options: RedisConnectOptions

Returns

Promise<Redis>