add config

This commit is contained in:
云风
2012-08-30 16:42:14 +08:00
parent 51ef283887
commit f4a895fa6f
2 changed files with 10 additions and 0 deletions

1
config
View File

@@ -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"

9
lualib/config.lua Normal file
View File

@@ -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