Initial commit, blog system works
This commit is contained in:
20
.lua/app.lua
Normal file
20
.lua/app.lua
Normal 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)
|
||||
Reference in New Issue
Block a user