node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org ยป


Lua scripts for redis-node

Injects all .lua files as commands to node-redis instances.


To inject your scripts first you need to load them:

lua_scripts = require('redis-lua')("/path/to/scripts/folder")

Then inject them to your redis instances:

redis = require('redis').createClient(...)

Scripts filename format

The filename of your scripts must follow this format:


For example:

msismember_1.lua # creates the msismember command, with 1 arguments for `KEYS`, the rest for `ARGV`
mscard_n.lua # creates the mscard command, with all arguments sent as `KEYS`.