I am fairly new to node and using express with it.
I have a simple API which gets data from mongo in this way:
- From a
RouterI call a async method inAccountServices(which is in a different file) calledgetAccountDetails getAccountDetailsin turn gets data from mongo making an async call.- I don't want to pass
req,resobjects to thegetAccountDetailsfunction, So I've useasyncawaitand it works perfectly.
What I want to understand is does my whole thread/api goes into wait state for that async await function to resolve?
If So, how can I overcome this.