mod_admin_web: Serve resources from resource path in trunk/0.11
See trunk/be73df6765b9
--- a/mod_admin_web/admin_web/mod_admin_web.lua Thu Oct 08 12:20:48 2020 +0200
+++ b/mod_admin_web/admin_web/mod_admin_web.lua Thu Oct 08 12:26:56 2020 +0200
@@ -130,8 +130,13 @@
end) then
serve = module:depends"http_files".serve;
end
+ local path = module:get_directory() .. "/www_files";
+ if module.resource_path then
+ -- Available from trunk be73df6765b9 if installed via luarocks
+ path = module.resource_path .. "/admin_web/www_files";
+ end
local serve_file = serve {
- path = module:get_directory() .. "/www_files";
+ path = path;
};
-- Setup HTTP server