You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's time to host the backend by transitioning to serverless functions in Vercel.
Definition of Done
Tsunami, Soft Story and Liquefaction APIs are implemented as serverless functions in Vercel.
All Tsunami, Soft Story and Liquefaction endpoints currently handled by FastAPI are functional as serverless functions.
Engineering Details
Use Vercel's Python runtime for creating the serverless functions.
Add vercel.json to handle routing.
Place the FastAPI app in the api directory in the root folder and import the routers from the backend/api/routers.
Add requirements.txt to the api folder, which contains only necessary dependencies. A serverless function can't weigh more than 250MB, so every dependecy matters.
Test endpoints locally using the Vercel CLI (vercel dev) to ensure proper functionality before deployment.
Context
It's time to host the backend by transitioning to serverless functions in Vercel.
Definition of Done
Engineering Details
vercel.json
to handle routing.api
directory in the root folder and import the routers from thebackend/api/routers
.requirements.txt
to the api folder, which contains only necessary dependencies. A serverless function can't weigh more than 250MB, so every dependecy matters.vercel dev
) to ensure proper functionality before deployment.Vercel Docs: Advanced Python Usage
Example Repository: Next.js + FastAPI
The text was updated successfully, but these errors were encountered: