OPEnSLab-OSU / Spool

GNU General Public License v3.0
2 stars 1 forks source link

Express doesn't redirect to react views #6

Closed eliwinkelman closed 4 years ago

eliwinkelman commented 5 years ago

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

Accessed through the url: Accessed through the url