Hello everyone,
I am using Python and FastAPI to deploy an API using vercel. The fastapi is working on my local host 127.0.0.1:8000 but it is not working on vercel. I have used this approach on a different project also and it worked for that project (same tech stack)
you need to make sure the Python code is inside /api folder so our build system can generate it as Serverless function. You can get started with our FastAPI template
Thank you so much @vikhyathsudembala-ve , that solved my problem. I have successfully deployed the project on vercel. I guess the problem was with the python-dotenv==<version>.
Thank you everyone for your time. (especially @swarnava and @vikhyathsudembala-ve )
I have solved the issue. It was being caused because I was trying to save the data to a file as part of my previous data backup and debugging efforts. (rookie error)
Thanks again Vercel. It has been a great experience.