You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an example script that shows how to set up a Lua script in Redis and execute it. Your script should take two Redis keys as arguments and one other numeric argument. Have the script increment the value stored at each of the keys by the value passed as a numeric argument.
e.g. if key mykey doesn't exist, and key myotherkey holds the value 5, then running the script passing keys mykey and myotherkey and the value 10 should result in mykey holding 10 and myotherkey holding 15.
Name your file lua-multi-incr.js. Name the JS function containing your code luaMultiIncr and name the Lua script mincr in node-redis' scripts when creating your client instance.
Pay attention to the guidelines for adding an example here when doing this.