diff options
| author | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-12 22:52:18 +0100 |
|---|---|---|
| committer | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-12 22:52:18 +0100 |
| commit | 14e2cc8846c844a234fb7688f84a874607dc96e9 (patch) | |
| tree | 4bcf1fdee1d85a971c8593a24bf06dfb4df752ea /templates | |
| parent | a56af29e6808ae4194f4a7fc5f7c906b146bb88e (diff) | |
add CLI tools
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/index.luax | 14 | ||||
| -rw-r--r-- | templates/reluax.luax | 24 |
2 files changed, 38 insertions, 0 deletions
diff --git a/templates/index.luax b/templates/index.luax new file mode 100644 index 0000000..6785491 --- /dev/null +++ b/templates/index.luax @@ -0,0 +1,14 @@ +return function() + return <html> + <head> + <title>PROJECT_NAME</title> + </head> + <body> + <h1>PROJECT_NAME</h1> + <p>Random number for you: {$ tostring(math.floor(math.random() * 100)) $}</p> + <p style={ "font-size: " .. tostring(math.floor(math.random() * 100)) .. 'px' }> + What font size is this? + </p> + </body> + </html> +end 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 +} + |
