Error 404 after adding nodejs backend

Hello, I had a deployed front end only site using html, css, and some javascript animations. The deployment worked. Once I added in a backend with express and nodejs it now returns error 404. Localhost will run the app fine, and connect to my mongodb atlas database fine. My github is calmacdonald · GitHub and the repo is named Portfolio and it is public to checkout my code. I have tried to play around with the configuration of the JSONs, but nothing has worked. The enviorment variable works in local, so there should not be an issue with that. My deployment is also integrated with mongodb atlas and has read write permissions on the database. My deployment setup is framework: other, output Directory: . (this was required for testing vercel dev on localhost), root directory: blank, include files outside the root directory: enabled, nodejs version: 18.x. Please help, im not sure what the issue could be. If i make my root directory be source in the deploy settings, it will load index.html, but none of the routes work when communicating with the backend.

Hi, @calmacdonald!

We recently published this post on how to debug 404 errors. Can you go through it to see if it will help?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.