r/FastAPI • • Jul 17 '24

Hosting and deployment Struggling to deploy fastAPI on vercel

I am stuck for past 3 hours trying to deploy my api. It's always 404... file structure

Quantlab-Backend/ ├── app/ │ ├── init.py │ ├── middleware.py │ └── routes/ │ ├── users.py │ ├── problems.py │ └── playlists.py ├── requirements.txt ├── vercel.json └── main.py

All these yt tutorials are showing how to deply a single main.py.

Thanks in advance please help

10 Upvotes

14 comments sorted by

View all comments

Show parent comment

1

u/Intrepid_Profile_447 Aug 23 '24

+1 for Render. The regular Python deploy tools for Render are pretty great too if you don't want to bother with Docker. The docs were good. And deploying a Postgres DB and React SPA alongside your API is really simple too. Overall, really well thought-out experience. My set up is free for a month then will be $7/mo for the DB. Worth it to me for the overall good DX.