here you goThings I’ve made, read and saved — shared here.

Archive

9,608 entries: 53 from X, 8,925 from Pinboard, saved 1998 to 2026.

Browse by tag, site, author, folder or language

Tags

Sites

Authors

Folders

Languages

3 entries#webserver ×

2023

Notes on Algernon

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 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

notes#webserver

2022

Redbean

Redbean single-file distributable web server is built using cosmopolitan.

Redbean's home page does a great job of explaining what the software does:

rebean is an open source webserver in a zip executable that runs on six operating systems. The basic idea is if you want to build a web app that runs anywhere, then you download the redbean.com file, put your .html and .lua files inside it using the zip command, and then you've got a hermetic app you can deploy and share.

redbean embeds Lua, SQLite, and MbedTLS into a fork() driven application server that benchmarks at 1.1 million qps on a personal computer. It's got a live bestline REPL with code completion and a UNIX module too, that lets you directly use the Cosmopolitan Libc system call interface. redbean furthermore provides sandboxing and system call tracing for security. This makes redbean a great fit for when you want to build an app that's vertically integrated into a single tiny file that runs on nearly all PCs and servers.

--

Deploying a redbean app to Fly from Simon Willison’s TILs

Redbean Tiddlywiki Saver: rpdillon.net; Nov 2022.

shmup/awesome-cosmopolitan: List of Cosmopolitan Libc related resources and projects

Fullmoon is a Fast and minimalistic Redbean-based Lua web framework in one file by Paul Kulchenko, the creator of ZeroBraneStudio, a Lua IDE.

notes#c#embedded#lua#sqlite#webserver

2017