Files
lipu-sitelen/path_fix.lua
T
2026-09-13 16:39:28 -06:00

17 lines
502 B
Lua

-- WARNING this works in LuaJIT but fails in OpenResty; it somehow ignores the path
-- there is no way to find the correct load path / current user from OpenResty
local CODE_PATH = "/Users/tangent/.luarocks/share/lua/5.1/"
local lapis
local success, error_message = pcall(function() return require("lapis") end)
if success then
lapis = error_message
else
package.path = package.path .. ";" .. CODE_PATH .. "?.lua;" .. CODE_PATH .. "?/init.lua"
lapis = require("lapis")
end
lapis.serve("app")