I have a meteor app which has a rather large class to interact with an external API. It has an axios instance, but I created a request method for the class which calls axios using Meteor’s Promise.await. Because of this, every method of the class is defined as a synchronous function. E.g.:
Now my problem is that if I want to use this class in a non-meteor app (I’d like to create some lightweight workers to offload some cronjobs of the main meteor app), I’d have to convert every method which uses this wrapped request method to an async method. So my question is, is there a way to use Promise.await in a non-meteor app? Or if it’s not possible and I decide to re-write the class to use async methods, how can I call Meteor.wrapAsync to “convert” an entire class (with a lot of async methods) to be synchronous?