Currently testing my react + flask app locally. Im hosting on EC2 but thats for prod. At first, I received an error on my web console about CORS so I temporarily disbaled it using a chrome extension. Now I receive this error:
enter image description here
Here is my App.js (React):
enter image description here
Here is my app.py (flask app):
enter image description here
Everything is correctly installed on my flask app using a venv. Ive got both flask and react app running at the same time. Im using .env. files for production url and dev url.
Also, when I typed in the actual localhost on axios.get() in my app.js, everything worked, I could see the json message from flask route. I have tried playing around with the code a lot from making sure everything was installed on flask, changing url on axios.get().
alexis alvarez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.