Next.js with MongoDB not getting data in deployment

Hi,
Can someone help me to solve this problem?
My site is https://wealthstar.netlify.app/
I used MongoDB database. I added cors and env mongodb url string.
But api and mongodb not working (not getting data) and all retrieved data are empty arrays.
Shall I need to add any middleware?
Where can I check api logs?
Thanks,
Lalitha

Hi Hrishikesh,

Thank you for your suggestion. I have discovered that the issue lies not with MongoDB, but with the next API function. I am using Next.js v5 runtime. Could you please advise me whether I need to write Netlify functions for each API function, or if I can simply add configuration to the API function?

Thanks.

Hi,
Shall I need to add any middleware or any other files?

Thanks,
Lalitha

What exactly have you discovered? What is the issue with Next API Functions?