How to host Flask API Server in my Next JS Project on Vercel?
Unanswered
Brown bear posted this in #help-forum
Brown bearOP
Hey there I have a Python folder in my t3 stack app. How can I host it to run in Vercel?
I am using it for endpoints relating to GPT4 + Replicate to pass to Next JS
I am on the pages directory if that helps.
Thanks
I am using it for endpoints relating to GPT4 + Replicate to pass to Next JS
I am on the pages directory if that helps.
Thanks
3 Replies
You can’t host long-running servers on vercel. But you can use their api to host Serverless functions with Python.
Brown bearOP
So I could make a endpoint using Flask in the Api folder?
so something like
api/ai-music-tools/generate_lyrics.py
so something like
api/ai-music-tools/generate_lyrics.py
@Brown bear So I could make a endpoint using Flask in the Api folder?
so something like
api/ai-music-tools/generate_lyrics.py
No, they would need to be deployed seperately to vercel. Next.js is a node framework.