I'm encountering issues while trying to connect CSS and JS files to my HTML file's head section.
Below is the HTML code snippet:
<!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>
Here are the file paths:
>node modules
-package.json
-package-lock.json
-server.js // Handles express and socket.io functionality
>main //folder
-index.html
-style.css
-client.js
Even after researching various threads related to this issue, I haven't been able to resolve it.
Both the CSS and JS files are accurate without any errors, as per my VS Code editor.
My console displays the following error message:
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.