File structure
index.js:
app.set("view engine", "ejs");
app.use(express.static("public"));
app.use(
bodyParser.urlencoded({
extended: true,
})
);
chat.ejs
<body>
<h1><%= (roomName) %></h1>
<div id="video-grid">
</div>
<script src="script.js"></script>
</body>
while loading, error displayed
"The resource from “http://localhost:5000/chat/Aishu%20study/Aneesa/script.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)."
It works if I keep everything in the same html file. can someone help me with this? I'm not sure what the problem is
