Yeah, I looked at that, but I still need to define the rest route and have some opinion on how I want to do it http-wise.
Maybe that is fine, but I just wonder if there is nothing out there where I can define the function server-side and invoke it on the client as if it was a local function.