lapis icon indicating copy to clipboard operation
lapis copied to clipboard

Routing shortcuts for HTTP verbs

Open robgunnatkin opened this issue 12 years ago • 2 comments

Is there a reason there isn't a lua api for something like:

app:get("/users", function(self)
end)

app:post("/users", function(self)
end)

robgunnatkin avatar Sep 09 '14 02:09 robgunnatkin

Those should work. There are examples in the documentation but I don't think I explicitly described them anywhere. I can update the docs.

leafo avatar Sep 09 '14 12:09 leafo

I've just been reading the docs to get a feel for Lapis. Great work, BTW. In the reference manual it has examples for moonscript via 'responds_to' wrapper. I didn't see anything equivalent for lua.

robgunnatkin avatar Sep 09 '14 15:09 robgunnatkin