examples
examples copied to clipboard
Next.js + Flask fails in production
I'm visiting the url: https://nextjs-flask-starter.vercel.app/ which is your official demo of this Next.js + flask example and I'm getting an error when going to https://nextjs-flask-starter.vercel.app/api
Additionally, would you be so kind to show an example of sub paths? e.g. /api/echo
I think @steven-tey created the example
It appears Vercel's demo still doesnt work if you go to https://nextjs-flask-starter.vercel.app/api/python, which the code suggests is a valid API route.
I'm going to try with the FastAPI Template, as at least its demo works, so I can reverse engineer.
has this been resolved? the demo still doesnt work, while annoyingly it works locally
Bump
Resolved by https://github.com/vercel/examples/pull/927 I believe. Please reopen and @ me if not!
@trek The starter is still broken, I ran the "deploy" right from the site https://vercel.com/templates/next.js/nextjs-flask-starter - and the initial build failed.
I have my own repo based of that starter and I got the deploy/build to work, but the Flask API route does not work (it works locally), still trying to figure out why.
@trek Same thing. I got my configuration to work perfectly fine locally but I keep getting a 405 error when I call the route in production which is weird because the POST route I have configured works fine locally but then all of a sudden it can't find it in prod.