How to use register_http

“test.lua”, `
test={}
– Get the mean value of a table
function test.printWorld(ctx)
print(“Hello World”)
end

print(“Test Module Loaded”)
return test

http-invoke.lua", local nakama = require("nakama") local test = require("test") nakama.register_http(test.printWorld, "test/helloworld") )

nk.register_http(“/test”, handle_request)

i can’t find the doc.

i update nakama to Server version: 3.24.2+0930eb88

Hello @codeman1989,

To register what we call RPCs (Remote Procedure Calls) in the Lua runtime you should use the register_rpc function.

There’s a few examples here and also in our project template.

Hope this helps.