Trouble with backend deployment -- 404 error

hello I’m working on a Stream encryption tutorial (working with an established repo that I didn’t create), which I’ve deployed to Netlify and am having trouble with the backend. both the frontend and backend work perfectly locally – I’ve deployed the backend on Netlify to animated-froyo-aa2c68.netlify.app and the frontend to https://celadon-llama-ce8ee1.netlify.app

I’ve changed the links in the frontend to correspond with the netlify URL of the backend, but I’m getting a 404 failed to load resource error when I attempt to use the app, and I visit the backend URL I get page not found. I’ve read through the existing support on this topic, but am struggling to figure out a solution that works with the code structure that I’m working with.

thanks in advance! any help would be hugely appreciated, happy to provide more info if needed.

Hey @lhsi

How is the backend written? Is it using serverless functions for example?

Can you share the repository you are deploying from?

Hi, @lhsi. This support guide might also help here:

If there are other questions that doesn’t answer, please let us know.

1 Like

here is the repo! GitHub - lindsey-hsi/stream-tutorial

Thanks @lhsi

The reason for the 404 on the index of the backend site is there is no index.html as explained in [Support Guide] I’ve deployed my site but I still see "Page not found”.

I see there is a serverless function node-fetch that connects to a Heroku deploy that seems to only return some basic JSON but cannot guess how you are using it.

The third thing is outlined in the support guide shared by @luke as the backend is an Express.js app and uses a listener which doesn’t work on Netlify. It is possible to run Express.js apps as outlined in the following post