Initial commit, blog system works

This commit is contained in:
2026-07-16 21:08:50 -05:00
commit 3841122960
22 changed files with 5628 additions and 0 deletions

20
.lua/app.lua Normal file
View File

@@ -0,0 +1,20 @@
-- app.lua — application wiring, loaded by .init.lua via require "app".
--
-- Route handlers live in routes_public.lua and routes_admin.lua; this
-- module opens the database, loads them, and registers the catch-all
-- 404 (which must be the last route).
local fm = require "fm"
local db = require "db"
local web = require "web"
-- Open blog.db and apply schema (idempotent).
db.init()
require "routes_public"
require "routes_admin"
-- Catch-all 404 (must be registered last).
web.route("/*", function(r)
return web.not_found()
end)