Created
March 20, 2015 10:15
-
-
Save bazilio91/fc5c9170e74899d2b74c to your computer and use it in GitHub Desktop.
template.lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local redis = require 'redis' | |
local host = "127.0.0.1" | |
local port = 6379 | |
client = redis.connect(host, port) | |
redis.call = function(cmd, ...) | |
return assert(loadstring('return client:' .. string.lower(cmd) .. '(...)'))(...) | |
end | |
local function dump(a) | |
for k, v in pairs(a) do | |
print(k, v) | |
end | |
end | |
redis.call("SELECT", 15) | |
-- here you can test your lua |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or use my little debugger thingy: https://github.com/RedisLabs/redis-lua-debugger 😄