0

Is it somehow possible to display a status message while fetching a database request from some API with Node.js and Express.js? The db request is taking some minutes... I'd like to display a status message like "pending request.." in the browser as long as it takes to get the results.. is that possible in some way? I know the request either is completed or failed, and I would probably need some state object or some kind of callback in the browser to do that, but I have no idea how..

2
  • Display pending message, start request, wait for response, display error or success message based on response. Have you tried anything? There is nothing conceptually difficult about this. Commented Feb 11, 2019 at 14:36
  • Could you add some basic examples of your code in the question? It's hard to tell what specific part you are confused about. Commented Feb 11, 2019 at 14:48

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.