summaryrefslogtreecommitdiff
path: root/reluax.luax
diff options
context:
space:
mode:
Diffstat (limited to 'reluax.luax')
-rw-r--r--reluax.luax38
1 files changed, 38 insertions, 0 deletions
diff --git a/reluax.luax b/reluax.luax
new file mode 100644
index 0000000..6845de6
--- /dev/null
+++ b/reluax.luax
@@ -0,0 +1,38 @@
+local Common = require("common")
+local Footer = require("components.footer")
+local AnimatedBg = require("components.animated_bg")
+
+local Home = require("pages.home")
+local NotFound = require("not_found")
+
+math.randomseed(os.time())
+
+local wrap_component = function(component)
+ return
+ <Common>
+ <div class="back-shadows"></div>
+ <div id="app-main">
+ {$ component $}
+ <AnimatedBg />
+ </div>
+ <Footer />
+ </Common>
+end
+
+local route = function(path, method, headers, body)
+ if method ~= 'GET' then
+ return 405, "Method not allowed"
+ end
+
+ if path == '/' then
+ return 200, wrap_component(<Home />)
+ end
+
+ return 404, NotFound()
+end
+
+return {
+ name = "rem.duckonaut.dev",
+ route = route
+}
+