

In my case, I put them into a sub-directory react-app, so the correct URL is … Now let’s have a look where the files actually live. Loading failed for the with source …Ī very common thing you might see there in a “white-screen-situation”, is that your app failed to load the JavaScript bundle – and that’s what we’re going to fix today. To find out what’s wrong, it’s always a good idea to open your browser’s console and check it for error messages.

For example, a critical error somewhere in your JavaScript, who knows? The reason for this could be practically everything. But as you visit the site – instead of your freshly deployed app – you see … nothing. The second change is in React's src/App.It’s one of the most annoying situations after deploying a static React app: After all that work, you finally deployed your app for production. First, the api.py file needs to be updated: get_current_time(): This change needs to be made in two places in the project. In the future, I'm going to implement any API routes with the same /api prefix, so that all the endpoints coming from the Python side are under the same root URL. So I'm going to rename /time to /api/time. When I started thinking about deployment I realized that it would be more convenient to have the API routes namespaced, so that they do not get mixed with any possible routes used by the React side. As you recall, the Flask portion of the project was a little API with a single endpoint /time that returned the current Unix time. Namespacing API Routesīefore we begin looking at deployment options, I want to make a small change to the project as I left it in the first part of this series. Have you missed the first part of this tutorial? You can find it here.
