diff options
Diffstat (limited to 'example/reluax.luax')
| -rw-r--r-- | example/reluax.luax | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/example/reluax.luax b/example/reluax.luax new file mode 100644 index 0000000..a343826 --- /dev/null +++ b/example/reluax.luax @@ -0,0 +1,24 @@ +local index = require("index") + +math.randomseed(os.time()) + +local function route(path) + if path == '/' then + return index() + end + + return <html> + <head> + <title>Error 404</title> + </head> + <body> + <h1>Error 404</h1> + <p>Page not found.</p> + </body> + </html> +end + +return { + name = "hello-world", + route = route +} |
