auto replace lua script path

This commit is contained in:
liyong
2022-02-08 13:57:15 +08:00
committed by XiaoLi
parent ebc73eed8d
commit 022679a784
7 changed files with 42 additions and 10 deletions
+3 -1
View File
@@ -1,5 +1,7 @@
-- 指定模块引用目录,否则无法加载同目录下的其他文件
package.path = package.path .. ';/usr/local/opt/openresty/nginx/scripts/?.lua';
--package.path = package.path .. ';/usr/local/opt/openresty/nginx/scripts/?.lua';
package.path = package.path .. ';$script_path/?.lua';
local cjson = require "cjson"
local uuid = require "resty.jit-uuid"
local http = require "resty.http"