From 14e2cc8846c844a234fb7688f84a874607dc96e9 Mon Sep 17 00:00:00 2001 From: Stanisław Zagórowski Date: Fri, 12 Jan 2024 22:52:18 +0100 Subject: add CLI tools --- templates/index.luax | 14 ++++++++++++++ templates/reluax.luax | 24 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 templates/index.luax create mode 100644 templates/reluax.luax (limited to 'templates') 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 + + PROJECT_NAME + + +

PROJECT_NAME

+

Random number for you: {$ tostring(math.floor(math.random() * 100)) $}

+

+ What font size is this? +

+ + +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, + end + + return 404, + + Error 404 + + +

Error 404

+

Page not found.

+ + +end + +return { + route = route +} + -- cgit v1.3.1