peachy/assets/.init.lua

14 lines
349 B
Lua
Raw Normal View History

2024-06-10 04:50:33 +00:00
-- LaunchBrowser()
2024-06-10 04:28:01 +00:00
2024-06-10 23:40:10 +00:00
local migrate = require "migrate"
2024-06-10 23:40:10 +00:00
migrate.migrate()
2024-06-10 04:28:01 +00:00
fm = require "fullmoon"
fm.setTemplate("hello", "Hello, {%& name %}")
fm.setRoute("/hello/:name", function(r)
return fm.serveContent("hello", {name = r.params.name})
end)
fm.setTemplate("itworks", "<h1>It works!</h1>")
fm.setRoute("/", fm.serveContent("itworks"))
fm.run()