From 0cc1ef7105964645500e1113be908fdc50e9d89c Mon Sep 17 00:00:00 2001 From: Stanisław Zagórowski Date: Fri, 19 Jan 2024 23:17:28 +0100 Subject: example: add basic, move hello world into its own dir --- example/hello-world/reluax.luax | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 example/hello-world/reluax.luax (limited to 'example/hello-world/reluax.luax') diff --git a/example/hello-world/reluax.luax b/example/hello-world/reluax.luax new file mode 100644 index 0000000..2562fb1 --- /dev/null +++ b/example/hello-world/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, + + Error 404 + + +

Error 404

+

Page not found.

+ + +end + +return { + name = "hello-world", + route = route +} -- cgit v1.3.1