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
- unless I want to compile a page and publish it, I don’t need to run:
make full. - run
make easyas a cronjob on the server and have it publish to thewwwevery 15 minutes - run
make fullas a cronjob on the server and have it publish to thewwwevery hour