I'm having problems with linking CSS and JS files in my HTML file's head.
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<title>title</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" src="https://www.w3schools.com/w3css/4/w3.css">
<script src="/socket.io/socket.io.js"></script>
<script src="client.js" type="script"></script>
</head>
File paths look like this:
>node modules
-package.json
-package-lock.json
-server.js // Make the express and socket.io stuffs
>main //folder
-index.html
-style.css
-client.js
I've looked at a lot of previous threads about this but nothing fixed my issue.
Both the CSS and JS files are correct, there aren't any errors in them, or at least my editor (VS code) says so.
The console gives me this error:
Refused to apply a style from 'http://localhost:3000/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.