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

x/upstash_redis/platforms/nodejs.ts>Redis

HTTP based Redis Client for Serverless and Edge Functions
Go to Latest
class Redis
import { Redis } from "https://deno.land/x/upstash_redis@v1.19.3/platforms/nodejs.ts";

Serverless redis client for upstash.

Constructors

new
Redis(config: RedisConfigNodejs)

Create a new redis client by providing the url and token

new
Redis(requesters: Requester)

Create a new redis client by providing a custom Requester implementation

new
Redis(configOrRequester: RedisConfigNodejs | Requester)

Static Methods

fromEnv(config?: Omit<RedisConfigNodejs, "url" | "token">): Redis

Create a new Upstash Redis instance from environment variables.

Use this to automatically load connection secrets from your environment variables. For instance when using the Vercel integration.

This tries to load UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN from your environment using process.env.