- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
Latest commit
24 lines (22 loc) · 563 Bytes
/
Copy pathmain.lua
File metadata and controls
24 lines (22 loc) · 563 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--#region 定义库路径
package.cpath="./libs/5.4/lib/?.dll;"
package.path="./libs/5.4/lua/?.lua;./libs/redis/?.lua;./?.lua"
--#endregion
localredis=require('redis_env')
localparams= {
host='127.0.0.1',
port=6378,
password='redis!2#',
db=0,
}
redis.connect(params)
--
localtest_file='./test/test2.lua'
localkeys= { 'key1' }
localargv= { '111112' }
localresult=redis.runLuaFile(test_file, keys, argv)
iftype(result) =='table' then
print(table.unpack(result))
else
print(result)
end