Next.js Discord

Discord Forum

Cannot connect to MongoDB in a deployed Node.js+Typescript backend on Vercel

Unanswered
Eastern yellowjacket posted this in #help-forum
Open in Discord
Eastern yellowjacketOP
Hi, guys. I deployed my backend project to Vercel. This is Node.js+Typescript backend which has user authentication and authorization functionality. Here is my backend project with zip file.
The project APIs are looking like below.

GET - /
POST - /api/user/current
POST - /api/user/login
POST - /api/user/register
POST - /api/user/accessToken

In the images I provided, the / and /api/user/current APIs are working. But when I call other APIs, I'm getting error like the 3rd image with 504 error. I think this is because mongoose connection error. Is there anybody who can help me with that?

1 Reply

European sprat
i'd suggest putting the code in a github repo and sending the link, not a a rar