My Node.js website's stylesheet = null
Hello, I didn't found the styleshet, while I defined the stylesheet in style.css file, but when I try to find it in my website, it shows monospaced element like this:
Cannot GET /style.css
Can you help?
you have a static folder that's correct
but you need to host that static folder.
app.use(express.static(__dirname + "/static"));
add that after the
const app = express();
Also, have you considered using
res.sendFile() instead of copying and pasting your HTML files??