diff --git a/config b/config index 1a28330f..f5f5c448 100644 --- a/config +++ b/config @@ -10,3 +10,4 @@ standalone = "0.0.0.0:2012" luaservice = root.."service/?.lua;"..root.."service/?/init.lua" cpath = root.."service/?.so" protopath = root.."proto" +redis = root .. "redisconf" diff --git a/lualib/config.lua b/lualib/config.lua new file mode 100644 index 00000000..6ec7b59f --- /dev/null +++ b/lualib/config.lua @@ -0,0 +1,9 @@ +local function config(path , pre) + assert(path) + local env = pre or {} + local f = assert(loadfile(path,"t",env)) + f() + return env +end + +return config \ No newline at end of file