update
Browse files- app.lua +2 -2
- app/v1/app.lua +5 -1
app.lua
CHANGED
|
@@ -29,5 +29,5 @@ ngx.say("pass_url: ", pass_url)
|
|
| 29 |
-- require(lua_path)
|
| 30 |
local lua_path = "app/" ..api_version .. "/app"
|
| 31 |
ngx.say("lua_path: ", lua_path)
|
| 32 |
-
|
| 33 |
-
ngx.say("
|
|
|
|
| 29 |
-- require(lua_path)
|
| 30 |
local lua_path = "app/" ..api_version .. "/app"
|
| 31 |
ngx.say("lua_path: ", lua_path)
|
| 32 |
+
module = require("app/" .. api_version .. "/app") --require 是没问题的
|
| 33 |
+
ngx.say("module.a: ", module.a)
|
app/v1/app.lua
CHANGED
|
@@ -1,2 +1,6 @@
|
|
| 1 |
ngx.say("version: v1")
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
ngx.say("version: v1")
|
| 2 |
+
local module = {
|
| 3 |
+
a = "some_value",
|
| 4 |
+
b = "another_value"
|
| 5 |
+
}
|
| 6 |
+
return module
|