summaryrefslogtreecommitdiff
path: root/reluax.luax
diff options
context:
space:
mode:
authorDuckonaut <duckonaut@#gmail.com>2026-11-09 17:42:26 +0100
committerDuckonaut <duckonaut@#gmail.com>2026-11-09 17:42:26 +0100
commite5c378a13548d8f7ef7e1f883e7a98fd0e9207b4 (patch)
treefbbdac52680ef33891a12e7be4f32e62ec40ab5c /reluax.luax
parent5efada68310a073a9ebe2398d676cdfb0f4e428a (diff)
visits and cleanup
Diffstat (limited to 'reluax.luax')
-rw-r--r--reluax.luax5
1 files changed, 4 insertions, 1 deletions
diff --git a/reluax.luax b/reluax.luax
index 6845de6..6cd4949 100644
--- a/reluax.luax
+++ b/reluax.luax
@@ -19,13 +19,16 @@ local wrap_component = function(component)
</Common>
end
+local visits = 0
+
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 />)
+ visits = visits + 1
+ return 200, wrap_component(<Home visits={visits}/>)
end
return 404, NotFound()