Deploying a nextjs and flask app and using next server functions

Hello! I’m trying to deploy a nextjs and flask app. the only issue is that I’m not able to call apis that I built within the nextjs side, i get error “404 not found” I even tried setting a base url in my environment variables. when I run locally its able to call the apis fine please help!
image

image
x

In logs I see Running on http://127.0.0.1:5000 it should listen on 0.0.0.0