From ef75533bc54fdaa84dbb1e4a3a213af57fad3915 Mon Sep 17 00:00:00 2001 From: unwox Date: Mon, 27 Jan 2025 17:44:25 +0600 Subject: add both camelCase and kebab-case versions of API functions --- example/main.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'example') diff --git a/example/main.lua b/example/main.lua index 98e3ea8..335eaad 100644 --- a/example/main.lua +++ b/example/main.lua @@ -97,7 +97,7 @@ luna.router.static("GET /static/", "static/") -- luna stdio when it's run with -D flag. in this case we print the result of -- evaluation. eval handler is evaluated once for each worker so the result -- may be printed more than once -luna.evalfn(function (text) - local res = loadstring(text) - print(res) +luna.onEval(function (text) + local res = (_G.loadstring or _G.load)(text) + res() end) -- cgit v1.2.3