aboutsummaryrefslogtreecommitdiff
path: root/templates/reluax.luax
diff options
context:
space:
mode:
Diffstat (limited to 'templates/reluax.luax')
-rw-r--r--templates/reluax.luax24
1 files changed, 24 insertions, 0 deletions
diff --git a/templates/reluax.luax b/templates/reluax.luax
new file mode 100644
index 0000000..8bba507
--- /dev/null
+++ b/templates/reluax.luax
@@ -0,0 +1,24 @@
+local Index = require("index")
+
+math.randomseed(os.time())
+
+local function route(path)
+ if path == '/' then
+ return 200, <Index />
+ end
+
+ return 404, <html>
+ <head>
+ <title>Error 404</title>
+ </head>
+ <body>
+ <h1>Error 404</h1>
+ <p>Page not found.</p>
+ </body>
+ </html>
+end
+
+return {
+ route = route
+}
+