Hey guys!
I'm new to NestJS world, so i'm struggling a bit with something that might be trivial for you all.
I have the following scenario:
- I have a lib(built in typescript), this lib is "mainly" a class, let's call it XPTOService. XPTOService main purpose is to make some SOAP calls, using
soaplibrary, which needs to instantiate anew Clientin an async way. - This XPTOService has a method called
buildwhich will create a new instance of the Client class fromsoappkg - This service has some other methods that will use that instance to make some SOAP calls
On the other side, i have my NestJS server, which will consume that library. I created a service, that will use that library, and access its available methods.
My problem here is, i need to initialize the lib first(calling the build method) before i can call any other method that relies on the Client instance, I've done some researches regarding Dynamic Module, but none of those articles that i read have a specific case like mine.
Anyone here knows how can i instantiate that lib inside my Service,calling the build method, and enable the whole application to use it?