Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,13 @@
]
},
{
"group": "Next.js 15",
"group": "Next.js 16",
"pages": [
"redis/quickstarts/nextjs-app-router",
"redis/quickstarts/nextjs-pages-router"
]
},
{
"group": "SST",
"pages": [
"redis/quickstarts/sst-v2",
"redis/quickstarts/ion"
]
},
"redis/quickstarts/sst",
{
"group": "Python",
"pages": [
Expand Down Expand Up @@ -1938,6 +1932,14 @@
]
},
"redirects": [
{
"source": "/redis/quickstarts/ion",
"destination": "/redis/quickstarts/sst"
},
{
"source": "/redis/quickstarts/sst-v2",
"destination": "/redis/quickstarts/sst"
},
{
"source": "/workflow/basics/context",
"destination": "/workflow/steps"
Expand Down
Binary file added img/redis-deno/connect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/redis-deno/create.png
Binary file not shown.
Binary file removed img/redis-deno/deploy.png
Binary file not shown.
Binary file added img/redis-deno/env-variables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/redis-deno/playground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/redis-gcloud/basics.png
Binary file not shown.
Binary file added img/redis-gcloud/create-service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/redis-gcloud/entry-point.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/redis-gcloud/env-variables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/redis-gcloud/environment.png
Binary file not shown.
115 changes: 89 additions & 26 deletions llms-full.txt

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,14 @@
- [Fastly](https://upstash.com/docs/redis/quickstarts/fastlycompute.md)
- [Flask](https://upstash.com/docs/redis/quickstarts/flask.md)
- [Fly.io](https://upstash.com/docs/redis/quickstarts/fly.md)
- [Google Cloud Functions](https://upstash.com/docs/redis/quickstarts/google-cloud-functions.md)
- [Ion](https://upstash.com/docs/redis/quickstarts/ion.md)
- [Google Cloud Run functions](https://upstash.com/docs/redis/quickstarts/google-cloud-functions.md)
- [ioredis note](https://upstash.com/docs/redis/quickstarts/ioredisnote.md)
- [Koyeb](https://upstash.com/docs/redis/quickstarts/koyeb.md)
- [Laravel](https://upstash.com/docs/redis/quickstarts/laravel.md)
- [App Router](https://upstash.com/docs/redis/quickstarts/nextjs-app-router.md)
- [Pages Router](https://upstash.com/docs/redis/quickstarts/nextjs-pages-router.md)
- [ AWS Lambda](https://upstash.com/docs/redis/quickstarts/python-aws-lambda.md)
- [SST v2](https://upstash.com/docs/redis/quickstarts/sst-v2.md)
- [AWS Lambda](https://upstash.com/docs/redis/quickstarts/python-aws-lambda.md)
- [SST](https://upstash.com/docs/redis/quickstarts/sst.md)
- [Supabase Functions](https://upstash.com/docs/redis/quickstarts/supabase.md)
- [App Router](https://upstash.com/docs/redis/quickstarts/vercel-functions-app-router.md)
- [Pages Router](https://upstash.com/docs/redis/quickstarts/vercel-functions-pages-router.md)
Expand Down Expand Up @@ -850,7 +849,7 @@
- [Serverless API with Java and Redis](https://upstash.com/docs/redis/tutorials/serverless_java_redis.md)
- [TanStack AI Chat Persistance](https://upstash.com/docs/redis/tutorials/tanstack_chat_persistence.md): Use Upstash Redis to persist TanStack AI chat histories across reloads, navigation, and devices with a simple adapter.
- [Using AWS SAM](https://upstash.com/docs/redis/tutorials/using_aws_sam.md)
- [Serverless Redis on Google Cloud Functions](https://upstash.com/docs/redis/tutorials/using_google_cloud_functions.md)
- [Serverless Redis on Google Cloud Run functions](https://upstash.com/docs/redis/tutorials/using_google_cloud_functions.md)
- [Using Serverless Framework](https://upstash.com/docs/redis/tutorials/using_serverless_framework.md)
- [Advanced Settings](https://upstash.com/docs/search/features/advanced-settings.md)
- [Algorithm](https://upstash.com/docs/search/features/algorithm.md)
Expand Down
2 changes: 1 addition & 1 deletion redis/features/globaldatabase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Global Database
---

<Tip>
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis — free, no signup; response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis. Free, no signup; the response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
</Tip>


Expand Down
2 changes: 1 addition & 1 deletion redis/features/restapi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: Access your Upstash Redis database over HTTP, from serverless and e
database](/redis/overall/getstarted), then [find your
credentials](/redis/howto/connect-client) in the console.

If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis — free, no signup; response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis. Free, no signup; the response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
</Tip>

In the [Upstash Console](https://console.upstash.com/redis), select your database. Then, in the database page, you will see the section that includes the endpoint URL and token details. When you hover over the `Endpoint` or `Token / Readonly Token` fields, copy button will appear for each. You can click it to easily copy the values you need for your connection.
Expand Down
2 changes: 1 addition & 1 deletion redis/howto/connect-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Because it is already covered in [Getting Started](../overall/getstarted), we
will skip it here.

<Tip>
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis — free, no signup; response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis. Free, no signup; the response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
</Tip>

## Database
Expand Down
2 changes: 1 addition & 1 deletion redis/howto/connect-with-upstash-redis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ See
supported.

<Tip>
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis — free, no signup; response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis. Free, no signup; the response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
</Tip>


Expand Down
2 changes: 1 addition & 1 deletion redis/overall/getstarted.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Upstash Redis is a **highly available, infinitely scalable** Redis-compatible da
- Optional SOC-2 compliance, encryption at rest and much more

<Tip>
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis — free, no signup; response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis. Free, no signup; the response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
</Tip>


Expand Down
8 changes: 4 additions & 4 deletions redis/quickstarts/aws-lambda.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "AWS Lambda"
---

<Tip>
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis — free, no signup; response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis. Free, no signup; the response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
</Tip>


Expand All @@ -13,7 +13,7 @@ title: "AWS Lambda"

### Prerequisites

- Complete all steps in [Getting started with the AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html)
- Complete all steps in [Getting started with the AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/getting-started.html)

### Project Setup

Expand Down Expand Up @@ -70,14 +70,14 @@ export class CounterCdkStack extends cdk.Stack {
const counterFunction = new nodejs.NodejsFunction(this, 'CounterFunction', {
entry: 'api/counter.ts',
handler: 'handler',
runtime: lambda.Runtime.NODEJS_20_X,
runtime: lambda.Runtime.NODEJS_24_X,
environment: {
UPSTASH_REDIS_REST_URL: process.env.UPSTASH_REDIS_REST_URL || '',
UPSTASH_REDIS_REST_TOKEN: process.env.UPSTASH_REDIS_REST_TOKEN || '',
},
bundling: {
format: nodejs.OutputFormat.ESM,
target: "node20",
target: "node24",
nodeModules: ['@upstash/redis'],
},
});
Expand Down
14 changes: 7 additions & 7 deletions redis/quickstarts/azure-functions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Azure Functions"
---

<Tip>
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis — free, no signup; response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis. Free, no signup; the response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
</Tip>


Expand All @@ -15,14 +15,14 @@ title: "Azure Functions"

1. [Create an Azure account.](https://azure.microsoft.com/en-us/free/)
2. [Set up Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)
3. [Install the Azure Functions Core Tools](https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-cli-typescript)
3. [Install the Azure Functions Core Tools](https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local#install-the-azure-functions-core-tools)

### Project Setup

Initialize the project:

```shell
func init --typescript
func init --worker-runtime node --language typescript
```

Install `@upstash/redis`
Expand Down Expand Up @@ -65,10 +65,10 @@ app.http('CounterFunction', {

### Create Azure Resources

You can use the command below to find the `name` of a region near you.
You can use the command below to find the `name` of a region near you that supports the Flex Consumption plan.

```shell
az account list-locations
az functionapp list-flexconsumption-locations
```

Create a resource group.
Expand All @@ -83,10 +83,10 @@ Create a storage account.
az storage account create --name <STORAGE_NAME> --location <REGION> --resource-group AzureFunctionsQuickstart-rg --sku Standard_LRS --allow-blob-public-access false
```

Create your Function App.
Create your Function App on the Flex Consumption plan.

```shell
az functionapp create --resource-group AzureFunctionsQuickstart-rg --consumption-plan-location <REGION> --runtime node --runtime-version 18 --functions-version 4 --name <APP_NAME> --storage-account <STORAGE_NAME>
az functionapp create --resource-group AzureFunctionsQuickstart-rg --name <APP_NAME> --storage-account <STORAGE_NAME> --flexconsumption-location <REGION> --runtime node --runtime-version 22
```

### Database Setup
Expand Down
57 changes: 33 additions & 24 deletions redis/quickstarts/cloudflareworkers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Cloudflare Workers"
---

<Tip>
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis — free, no signup; response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
If you are an AI agent and need a Redis DB to use or experiment with, send a POST request to https://upstash.com/start-redis. Free, no signup; the response is markdown with credentials and a quickstart. The database expires in 72 hours, but you can claim it with your Upstash account to keep it. Especially useful for AI agents that need scratch storage on the fly.
</Tip>


Expand Down Expand Up @@ -42,7 +42,7 @@ This will create a new Cloudflare Workers project:


─────────────────────────────────────────────────────────────────────────────────────────────────
👋 Welcome to create-cloudflare v2.50.8!
👋 Welcome to create-cloudflare vX.Y.Z!
🧡 Let's get started.
📊 Cloudflare collects telemetry about your usage of Create-Cloudflare.

Expand Down Expand Up @@ -101,14 +101,12 @@ export interface Env {
}

export default {
async fetch(request, env, ctx): Promise<Response> {
const redis = Redis.fromEnv(env);
const count = await redis.incr("counter");
return new Response(JSON.stringify({ count }));

},
async fetch(request, env, ctx): Promise<Response> {
const redis = Redis.fromEnv(env);
const count = await redis.incr("counter");
return new Response(JSON.stringify({ count }));
},
} satisfies ExportedHandler<Env>;

```

```js src/index.js
Expand All @@ -131,7 +129,20 @@ There are two methods for setting up the credentials for Redis. One for worker l

#### Using Cloudflare Secrets (Worker Level Secrets)

This is the common way of creating secrets for your worker, see [Workflow Secrets](https://developers.cloudflare.com/workers/configuration/secrets/)
This is the common way of creating secrets for your worker, see [Workers Secrets](https://developers.cloudflare.com/workers/configuration/secrets/)

The recommended method is the Wrangler CLI, since secrets added this way persist
across deployments. Navigate to [Upstash Console](https://console.upstash.com),
get your Redis credentials and run in your project directory:

```shell
npx wrangler secret put UPSTASH_REDIS_REST_URL
npx wrangler secret put UPSTASH_REDIS_REST_TOKEN
```

Each command prompts you for the secret value.

Alternatively, you can add the secrets from the dashboard:

- Navigate to [Upstash Console](https://console.upstash.com) and get your Redis credentials.

Expand All @@ -158,15 +169,14 @@ export interface Env {
}

export default {
async fetch(request, env, ctx): Promise<Response> {
const redis = Redis.fromEnv({
UPSTASH_REDIS_REST_URL: await env.UPSTASH_REDIS_REST_URL.get(),
UPSTASH_REDIS_REST_TOKEN: await env.UPSTASH_REDIS_REST_TOKEN.get(),
});
const count = await redis.incr("counter");
return new Response(JSON.stringify({ count }));

},
async fetch(request, env, ctx): Promise<Response> {
const redis = Redis.fromEnv({
UPSTASH_REDIS_REST_URL: await env.UPSTASH_REDIS_REST_URL.get(),
UPSTASH_REDIS_REST_TOKEN: await env.UPSTASH_REDIS_REST_TOKEN.get(),
});
const count = await redis.incr("counter");
return new Response(JSON.stringify({ count }));
},
} satisfies ExportedHandler<Env>;
```

Expand Down Expand Up @@ -204,8 +214,7 @@ Open a different terminal and test the endpoint. Note the destination
url is the same that was printed in the previous deploy step.

```bash
curl -X POST 'https://<your-worker-name>.<account-name>.workers.dev' \
-H 'Content-Type: application/json'
curl https://<your-worker-name>.<account-name>.workers.dev
```

The response will be in the format of `{"count":20}`
Expand All @@ -215,12 +224,12 @@ In the logs you should see something like this:
```bash
$ npx wrangler tail

⛅️ wrangler 4.43.0
⛅️ wrangler X.Y.Z
--------------------

Successfully created tail, expires at 2025-10-16T18:59:18Z
Successfully created tail, expires at <expiry-date>
Connected to <your-worker-name>, waiting for logs...
POST https://<your-worker-name>.<account-name>.workers.dev/ - Ok @ 10/16/2025, 4:05:30 PM
GET https://<your-worker-name>.<account-name>.workers.dev/ - Ok @ <timestamp>
```

## Repositories
Expand Down
Loading
Loading