Vercel + Next w/ Python backend
Unanswered
Singapura posted this in #help-forum
SingapuraOP
I've got a FastAPI backend in my next app structured as follows:
I'm trying to deploy this to Vercel, but I'm not too sure how to setup my
My
Does anyone have any ideas?
/api
--/routers
----route.py
--index.pyI'm trying to deploy this to Vercel, but I'm not too sure how to setup my
vercel.json for my serverless functions.My
route.py neesd to have an execution limit of 30 seconds, but I cannot seem to determine how to get this to work properly, since I'm performing a rewrite in my next.config.js as follows: rewrites: async () => {
return [
{
source: "/api/:path*",
destination: process.env.NODE_ENV === "development" ? "http://127.0.0.1:3001/api/:path*" : "/api/",
},
];
},Does anyone have any ideas?