Skip to content
/ thuja Public

lua lib with basic routing functions with a url/filesystem like recursive routing type with a tail

License

Notifications You must be signed in to change notification settings

Darvame/thuja

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thuja

First Look

```lua local thuja = require "thuja";

local tree = thuja:New();

local say_hello = function(self, tail, a1, ...) local to = #tail > 0 and table.concat(tail, ", ") or "everyone"; local alsoto = a1 and table.concat({a1, ...}, ", ") or nil;

print("I want to take this opportunity");
print("And say Hello to " .. to .. "!");
if alsoto then print("Especially to " .. alsoto .. "!"); end

end

-- reg it tree:Set("GET", "/say/hello/to", say_hello);

-- call it tree:Call("GET", "/say/hello/to/my dog/my cat/my mouse/my beetles///", "my grandma", "my grandpa");

---

I want to take this opportunity And say Hello to my dog, my cat, my mouse, my beetles! Especially to my grandma, my grandpa!

About

lua lib with basic routing functions with a url/filesystem like recursive routing type with a tail

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages