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.2-01 year ago595 downloads
1.1-01 year ago501 downloads
1.0-01 year ago551 downloads
0.9-01 year ago91 downloads
0.8-01 year ago(revision: 2)126 downloads
0.7-01 year ago167 downloads
0.6-01 year ago(revision: 2)743 downloads
0.5-01 year ago52 downloads
0.4-01 year ago48 downloads
0.3-01 year ago339 downloads
0.2-01 year ago87 downloads
0.1-01 year ago6 downloads

Dependency for

APIOAK, Apache APISIX

Manifests