10 lines
295 B
Lua
10 lines
295 B
Lua
-- LaunchBrowser()
|
|
|
|
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() |