app.use(express.static(__dirname + '/public'));
Unfortunately, despite my efforts to follow the advice provided in similar questions, the problem persists.
In my index.html file, I include the following references:
<link rel="stylesheet" href="public/css/style.css">
<script src="public/js/bundle.js"></script>
Additionally, in my app.js file, I utilize:
app.use(express.static(__dirname + '/public'));
Upon visiting the page, the console reports the following errors:
andlocalhost/:1 Refused to apply style from 'http://localhost:3000/public/css/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
GET http://localhost:3000/public/js/bundle.js 404 (Not Found)
localhost/:1 Refused to execute script from 'http://localhost:3000/public/js/bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.