I already got webapp package running, I’m able to call the method it self and it does return “test”
however when i wrap the method with async, it always returns {},
are you saying that on webapp i can configure this?
The method get-address will be called using HTTP.call, so on client side i wont be using Meteor.callAsync
Whenever i have async wrapped about a method, the HTTP.call with a post method, alwasy returns {}, once i remove the async, it returns anything i want, i check my http calls using postman
So I made progress with the issue, no solution yet however
This has to do with the fact that HTTP response is receiving a promise as its data, hence it serves it as {} always, something has to do with JSON serializing the result
In my example above I declared a function as async which returns a promise, and in result the data being returned will be converted to {}
If anyone looking for a soultion on how to send a promise over HTTP using Meteor method,
you should use Promise.await and not wrap the function in async, once you wrap the function in a sync and then return await result it will always be {},
use return Promise.await, instead