dimanche 1 mars 2020

Node mime type/html

I had this same problem yesterday where i didnt had my styles.css sheet on my public folder, so i created it and did the: app.use(express.static('public')); and it fixed this problem yesteday, so today i came across this new and same problem which i know what it is and how it's caused but i dont know what to do, cause i CAN access to my css file on the browser by entering localhost:3000/styles.css, so its supoused that there should be no problema, but...

localhost::3000/campgrounds can link to the css file via header.ejs, the rout page ("localhost:3000/") too but this location CANT get linked to css: localhost::3000/campgrounds/new. i did this..

Accesed the browser elements > network > CSS and it seems that my ejs file (new.ejs) is looking for the file in this route 'http://localhost:3000/campgrounds/styles. Which it doesnt exist cause campgrounds is an ejs file... not a folder, I hope someone understand what i am telling and can help me, im kinda new at programming so i dont really know how to describe a problem lol, my first issue post.

Thanks for reading

Error displayed




Aucun commentaire:

Enregistrer un commentaire