I completed a major milestone on a full stack express and react app that I have been working on.
For some reason, after building the React app for production and using Express to serve it, everything works just fine. The problem comes when I push it up to Heroku.
For a little bit of context, it is my resume built with React. In the future it will host my Developer Journal, which will hold information on all of the issues I have encountered in any development and what the solution is.
For some reason unbeknownst to me, the API calls are not functioning when hosted on Heroku. They work just fine when serving it locally. The calls are just not functioning at all, leading to the data not displaying on the app.
I check the Chrome Network tab, and see that the endpoint is returning a 304 error, which confuses me as it is the landing page and shouldn’t have already cached the results. This occurs on both my PC and my Cellphone.
The endpoint is written to accept a GET for ‘ /api/resumedata’, queries the Mongo Database and its different tables, puts it together in a JSON object, then returns it with a 200 status.
Yet when I use postman, I get this:
I am really interested in learning and getting this working, so here is a shot of my React’s Package.json (if it is needed):
Any help/advice is appreciated