I am trying to deploy my Flask webapp on Vercel, but I am having problems with deployment. Everything runs fine locally. I am a rookie and making this kind of project for the first time, so I am not entirely sure what to override in vercel.json and under what configuration category my project falls under.
My html page loads, but whenever I click any of the buttons that run the backend functions, there are error 404s on the fetch requests.
Similar to my suggestion above, it looks like it might be related to your routes.
The vercel.json file seems to point to run.py, which is fine, but make sure that your Flask application is set up correctly to run on Vercel.
The line "src": "/(.*)", "dest": "/" in the routes section might be overly broad, and it’s possible that it isn’t correctly pointing to your Flask app’s routes. You could try removing or modifying this line to ensure that the routes are handled as expected.
hi @pawlean I was able to deploy it and without the 404 not found but only after deploying it via the CLI(one is not required to use a virtual environment during this ) however with this the CSS was not loading either locally or even after deployment .
Incase I solve this I will be in touch .