I've been looking at some of the answers on this forum but nothing seems to work.
My main HTML file refers to the style sheet as follows:
<link rel="stylesheet" href="/styles/main.css">
I have an index.js file with the following code:
const express = require('express');
const app = express();
const port = 3000;
app.get('/', (req, res) => {
res.sendFile('index.html', {root: __dirname});
});
app.listen(port, () => {
console.log(`Now listening on port ${port}`);
});
Finally, this is my folder structure:
I'd really appreciate some guidance on this