Can't read css file in public folder

Hi everyone,
My HTML file can’t seem to access my CSS file. I have my css in the public folder and have used app.use(express.static(__dirname+“/public”)); to allow the html to access the static css file. What am i doing wrong? would be helpful is someone can point it out to me

Hi @Elektriks, welcome! Try swapping that line out with app.use(express.static("public")); and that should work. If not, share the project name so we can take a closer look!

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