I have a Jquery mobile client the sends an Ajax request to the Express server. From the Express server, it connects to the MongoDB using async function. the problem I face is the when the request is sent to MongoDB the responses delays few seconds. before receiving an empty JSON response sent to the client. how to handle the client-side request to wait until the response is received.
Any advice appreciated.
Thank you