Stylesheet not loaded because of MIME-type

For Node.js applications, check your configuration:

app.use(express.static(__dirname + '/public'));

Notice that /public does not have a forward slash at the end, so you will need to include it in your href option of your HTML:

href="https://stackoverflow.com/css/style.css">

If you did include a forward slash (/public/) then you can just do href="https://stackoverflow.com/questions/48248832/css/style.css".

Leave a Comment

tech