Getting 404 error with React + Flask on EC2 using prod URL
I am running a Flask + React app on EC2 using Vite. Everything is running fine on when I run ‘npm run dev’ as you can see here . Its also running fine from the flask end as you can see here . The issue is when I try to run it using my prod server with my ec2 url or even when I run ‘npm run build’ and ‘npm run preview’. I get the following when i run these commands. Also, when I type in my ec2 url, i get this. and when I type in ‘ec2-url/api/hello’, i get the same console error but my page shows the classic 404 message: ‘Not Found