Make fullmoon work
This commit is contained in:
parent
23ecfd9ba8
commit
98c839f868
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
||||
redbean*.com
|
||||
*.db
|
||||
.build
|
10
.init.lua
10
.init.lua
@ -1 +1,11 @@
|
||||
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"))
|
||||
print "did some stuff"
|
||||
fm.run()
|
15
Makefile
15
Makefile
@ -1,7 +1,16 @@
|
||||
.PHONY: run
|
||||
run: redbean/redbean-2.2.com
|
||||
redbean/redbean-2.2.com -D .
|
||||
run: .build/peachy.com
|
||||
.build/peachy.com
|
||||
|
||||
redbean/redbean-2.2.com:
|
||||
.PHONY: .build/peachy.com
|
||||
.build/peachy.com: redbean/redbean-2.2.com
|
||||
mkdir -p .build
|
||||
# rm .build/*
|
||||
cp redbean/redbean-2.2.com .build/peachy-noassets.com
|
||||
zip -r .build/peachy-noassets.com .init.lua .lua
|
||||
mv .build/peachy-noassets.com .build/peachy.com
|
||||
|
||||
|
||||
.redbean/redbean-2.2.com:
|
||||
wget --directory-prefix redbean https://redbean.dev/redbean-2.2.com
|
||||
chmod a+x redbean/redbean-2.2.com
|
||||
|
Loading…
Reference in New Issue
Block a user