diff options
Diffstat (limited to 'example/reluax.lua')
| -rw-r--r-- | example/reluax.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/example/reluax.lua b/example/reluax.lua new file mode 100644 index 0000000..0a5f2c7 --- /dev/null +++ b/example/reluax.lua @@ -0,0 +1,20 @@ +local index = require("index") + +math.randomseed(os.time()) + +local function route(path) + if path == '/' then + return index() + elseif path == '/goodbye' then + return "goodbye" + elseif path == '/random' then + return 'no more random' + end + + return nil +end + +return { + name = "hello-world", + route = route +} |
