When a user tries to go to a route that is accessible through the react application router directly in the browser, the route is handled by express and express does not forward unfound endpoint requests to the react app.
When a 404 error is triggered on the API, the api should serve the react app at the requested endpoint. If the endpoint is still not found by react, the react app can take care of displaying a 404 not found page.
When a user tries to go to a route that is accessible through the react application router directly in the browser, the route is handled by express and express does not forward unfound endpoint requests to the react app.
When a 404 error is triggered on the API, the api should serve the react app at the requested endpoint. If the endpoint is still not found by react, the react app can take care of displaying a 404 not found page.
Pictures:
Accessed through the react router:![Accessed through the react router](https://user-images.githubusercontent.com/17975309/66854218-c772b780-ef35-11e9-84ad-7a9be1d9afec.png)
Accessed through the url:![Accessed through the url](https://user-images.githubusercontent.com/17975309/66854250-dc4f4b00-ef35-11e9-9d69-9ee5c777581e.png)