# Notes on Algernon

- Page: https://shared.btbytes.com/p/algernon
- Date: 2023-10-10
- Tags: webserver

[Algernon](https://algernon.roboticoverlords.org/) is a webserver.

## Using Lua Local Require


From the [comments](https://github.com/xyproto/algernon/issues/76):

```lua
-- 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 easy` as a cronjob on the server and have it publish to the `www` every 15 minutes
- run `make full` as a cronjob on the server and have it publish to the `www` every hour
