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..
- 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.Azami– Azami2019-02-11 14:36:27 +00:00Commented 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.Treble Snake– Treble Snake2019-02-11 14:48:08 +00:00Commented Feb 11, 2019 at 14:48
Add a comment |