lua-resty-libr3

This is a libr3 implementation library base on FFI for Lua-Openresty

$ luarocks install lua-resty-libr3

-- r3 router
local r3 = require("resty.r3").new();
local encode_json = require("cjson.safe").encode

function foo(params) -- foo handler
ngx.say("foo: ", encode_json(params))
end

-- routing
r3:get("/foo/{id}/{name}", foo)

-- don't forget!!!
r3:compile()

-- dispatch
local ok = r3:dispatch("/foo/a/b", ngx.req.get_method())
if not ok then
ngx.exit(404)
end

Versions

1.1-023 days ago333 downloads
1.0-046 days ago545 downloads
0.9-049 days ago90 downloads
0.8-054 days ago125 downloads
0.7-062 days ago166 downloads
0.6-085 days ago733 downloads
0.5-089 days ago51 downloads
0.4-090 days ago47 downloads
0.3-0104 days ago338 downloads
0.2-0107 days ago86 downloads
0.1-0109 days ago6 downloads

Dependency for

apisix

Manifests