Scripts
EVAL
Evaluate a Lua script server side.
Arguments
scriptbodystringrequired
The lua script to run.
keysbodystring[]required
All of the keys accessed in the script
argsbodyunknown[]required
All of the arguments you passed to the script
Response
anyrequired
The result of the script.
Example
const script = ` return ARGV[1]`const result = await redis.eval(script, [], ["hello"]);console.log(result) // "hello"