what the fuck OpenResty

This commit is contained in:
2026-09-13 16:39:28 -06:00
parent f9d0af137b
commit d7bdca2190
3 changed files with 19 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
-- 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")