Module

x/r2d2/mod.ts>sendCommand

Fast, lightweight Redis client library for Deno.
Go to Latest
function sendCommand
import { sendCommand } from "https://dotland.deno.dev/x/r2d2@v0.0.14/mod.ts";

Sends a command to the Redis server and returns the parsed reply.

Example:

const redisConn = await Deno.connect({ port: 6379 });

// Returns "OK"
await sendCommand(redisConn, ["SET", "hello", "world"]);

// Returns "world"
await sendCommand(redisConn, ["GET", "hello"]);

Parameters

redisConn: Deno.Conn
command: Command

Returns

Promise<Reply>