Skip to main content

Documentation Index

Fetch the complete documentation index at: https://upstash.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Arguments

key
string
required
The key of the list.
elements
...TValue[]
required
One or more elements to push at the head of the list.

Response

The length of the list after the push operation.
const length1 = await redis.lpush("key", "a", "b", "c"); 
console.log(length1); // 3
const length2 = await redis.lpush("key", "d"); 
console.log(length2); // 4