Next.js Discord

Discord Forum

Localhost is able to fetch API request from my express server, deployed version is not.

Unanswered
West African Lion posted this in #help-forum
Open in Discord
Avatar
West African LionOP
express server is hosted on AWS E2 instance. Ubuntu node JS.
Image

4 Replies

Avatar
tafutada777
@West African Lion are you saying that your Next.js server deployed on Vercel failed to connect to your upstream, Express server via fetch? but it works localhost -> express API?
Avatar
West African LionOP
Resolved the issue already, had not clarified a sub directory Vercel was supposed to deploy from
But yes
Avatar
tafutada777
404 means the problem is located in Vercel app. if it resides btw upstream, it returns 502 or 504, bad gateway or timeout. or 5XX in fetch command