Im getting this error from glitch on a black background
failed to start application on simply-travel.glitch.me
This is most likely because your project has a code error.
Check your project logs, fix the error and try again.
Okay… You need to make a folder called public and place all the CSS and javascript files there. Those files in there will then work with directories. Also don’t move server.js though,
hold on wait, the css and js files are already their own folders, i could change the name of the css folder and do what you suggested to add the js files to the css folder and change its name to public
Hey, thanks for the help but I just rewinded the project. I’m fine with it. This is a school project with other people working on it too and I can’t risk messing up the website as the subdirectories stopped working and the CSS wouldn’t work and it honestly scared me.
Unfortunately, the suggestions on this page didn’t work for me either, the one with the folders caused my CSS to stop working. and the 2 express methods didn’t let the website load.
can I recap some of the really good advice we’ve seen in this thread?
move the 404 handler to the bottom: you’ve done this
make sure there’s a slash in constructs like __dirname + "/something.html": this was a minor detail and I wanted to ask if you got around to trying that
there have been much larger scale changes suggested, such as restructuring the projects to move pages into a ‘views’ directory, but I’d recommend seeing if you can get the above two working first before you decide whether to undertake these larger changes