Creates a new Redis client
constructor
RedisClient.constructor
@param url
URL to connect to, defaults to process.env.VALKEY_URL, process.env.REDIS_URL, or "valkey://localhost:6379"
@param options
Additional options
const valkey = new RedisClient();
await valkey.set("hello", "world");
console.log(await valkey.get("hello"));
Referenced types
interface RedisOptions
namespace RedisClient
- type KeyLike = string | ArrayBufferView | Blob