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

30
.init.lua Normal file
View File

@@ -0,0 +1,30 @@
-- special script called by main redbean process at startup
HidePath('/usr/share/zoneinfo/')
HidePath('/usr/share/ssl/')
-- fm from https://github.com/pkulchenko/fullmoon
local fm = require "fm"
local app = require "app"
-----------------------------------------------------------------
-- Basic Browser Launch Logic
-----------------------------------------------------------------
local function launch_browser(url)
if os.getenv("OS") == "Windows_NT" then
os.execute("start " .. url)
else
-- Try xdg-open for Linux, then open for macOS
if not os.execute("xdg-open " .. url .. " 2>/dev/null") then
os.execute("open " .. url)
end
end
end
-- Launch browser only on initial startup (skip for daemons/tests:
-- set BLOG_NO_BROWSER=1 to suppress).
if not _G.launched and not os.getenv("BLOG_NO_BROWSER") then
launch_browser("http://localhost:8080")
_G.launched = true
end
fm.run()