응답.sendFile(__dirname +'/index.html')를 하여 html파일을 브라우저로 보냈는데,
index.html에 연결한 index.css와 index.js와 img.png 가 로드가 안됩니다.
코드는 이렇게 작성했습니다.
//app.js
app.get('/', function(요청, 응답) {
응답.sendFile(__dirname +'/index.html')
});
//index.html
<link rel="icon" type="./image/png" href="img.png">
<link rel="stylesheet" type="text/css" href="index.css">
<script type="text/Js" src="index.js" defer></script>
//console의 오류사항
Refused to apply style from 'http://localhost:3000/index.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enable
Failed to load resource: the server responded with a status of 404 (Not Found)
//결과적으로 html만 브라우저에 표현되고, css랑 js랑 png는 표현이 안됩니다.
도와주세요 선생님!