marcopeg-dev / m07-cv-frontend

Frontend for M07 class project
4 stars 3 forks source link

Add a loading screen while Heroku wakes up #11

Closed marcopeg closed 4 years ago

marcopeg commented 4 years ago

Right now we deploy our backend on Heroku for free. The consequence is that after 30 minutes of inactivity, the backend goes to sleep.

The next request takes a few seconds to warm up the backen (well, up to 10s!) and it would cause a bad user experience into the main UI.

We should add a loading screen with some form of nice animation that covers the entire app, makes a first request to the backend (mabe toward a /status route that just returns +ok) and then goes away.

VernitaJ commented 4 years ago

Could I edit the current 'LoadingIndicator' component for this purpose?

marcopeg commented 4 years ago

@VernitaJ I believe it is best to create a new component for that, it will also need another custom hook as state.