Scripts
EVAL
Evaluate a Lua script server side.
const script = `
return ARGV[1]
`
const result = await redis.eval(script, [], ["hello"]);
console.log(result) // "hello"
Arguments
script
string
requiredThe lua script to run.
keys
string[]
requiredAll of the keys accessed in the script
args
unknown[]
requiredAll of the arguments you passed to the script
Response
The result of the script.
const script = `
return ARGV[1]
`
const result = await redis.eval(script, [], ["hello"]);
console.log(result) // "hello"