Old project that used to work doesn't start Cannot GET / problem

Hi, i came back to the old project of mine, but it doesnt seem to load. I get this Cannot GET /
And this message in console: Failed to load resource: the server responded with a status of 404 (Not Found)

Not sure what’s wrong, i didn’t change anything and it all used to work just fine before.
I do have these messages displayed, meaning it’s working on my part
Listening on port 3000
MongoDB Connection suceeded

Not mine but I found the next that might help you out here

Use your browser’s network inspector (F12) to see when the browser is requesting the bgbody.png image and what absolute path it’s using and why the server is returning a 404 response.

…assuming that bgbody.png actually exists :slight_smile:

Is your CSS in a stylesheet file or in a <style> block in a page? If it’s in a stylesheet then the relative path must be relative to the CSS stylesheet ( not the document that references it). If it’s in a page then it must be relative to the current resource path. If you’re using non-filesystem-based resource paths (i.e. using URL rewriting or URL routing) then this will cause problems and it’s best to always use absolute paths.

Going by your relative path it looks like you store your images separately from your stylesheets. I don’t think this is a good idea - I support storing images and other resources , like fonts, in the same directory as the stylesheet itself, as it simplifies paths and is also a more logical filesystem arrangement.


Without seeing the code it will be pretty hard to help.

I assume you are using Express? Are you doing static file serving or do you have a ‘/’ get route?

My bad, since it was an old project i forgot that i don’t use the localhost:3000/ path. I use localhost:3000/employees path.

Sorry for your wasted time.

P.S (how do you close the thread?)

You can just mark your own post as the solution.

Edit: Otherwise I think you have to get a mod to close the thread if you think that is necessary.