How to deploy a monorepo to two different places: Netlify for frontend and Vercel for backend?
I’m working on building a website using Next.js, where I perform some image calculations on user inputs in the backend and render some images on the frontend based on the results. I need to use a Node based backend because I’m using the library called Sharp which requires native Node dependencies. Initially my backend code was under the “pages/api” directory in my Next project and I had deployed the whole thing to Netlify. It was working fine but on the free plan Netlify allows only 10s for a function invocation before timing out, and my backend code takes slightly longer than that. So chose to make a completely separate folder for my backend and deploy it on Vercel as it allows 60s on the free plan. This went according to plan.