Next fetching data with express server
Unanswered
Bengal posted this in #help-forum
BengalOP
im trying to use next with express server, some routes work normally but one particular routes always returns empty array regardless of the server response. it works fine on browser.. i made an attempt with the fetch api as can be seen on the image, there are instances where it isnt empty with the fetch api and instances where it is, i think the fetch api logs twice one emty and the other contains the data
#async #datafetching
#async #datafetching
7 Replies
BengalOP
Solved, for some reason it seems to be caching issue
@Bengal Solved, for some reason it seems to be caching issue
Lapland Longspur
How did you deploy your express app together with nextjs to production in vercel?
BengalOP
It's not yet in production but I plan on using render or heroku for the express server and vercel for nextjs
@Lapland Longspur Do you have plans for this?
https://vercel.com/guides/using-express-with-vercel
BengalOP
I will go through this thank you
@Bengal I will go through this thank you
Lapland Longspur
I'm currently setting it up but I always ran into errors connecting my api to front end. Update me if you successfully deploy it
BengalOP
Ok