Notes on Algernon

Created: by Pradeep GowdaUpdated:Aug 01, 2024Tagged: webserver .

Algernon is a webserver.

Using Lua Local Require

From the comments:

-- loadscriptdir.lua
local r = require
local pp = package.path
require = function(m)
    package.path = scriptdir() .. "/?.lua;" .. pp
    return r(m)
end

-- serverconf.lua
OnReady(function()
    require("loadscriptdir")
end)

TODO: I have to figure out if this works for loading .so files also.

Frictionless workflow to use algernon powered website