Submitted July 20, 2020 at 04:54AM by the_mc_guy
Sunday, 19 July 2020
Refused to apply style from because its MIME type.
Hey Guys,I'm following a tutorial on node.js, but i keep running into this error, even though I am straight copying the tutorial (it's from 2018, maybe some updates have occurred. Please see the code below, and help me out?Error from Chrome Source: Refused to apply style from 'http://localhost:3000/public/css/main.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.My Work:HTML:
Weather
JS:app.use("/public", express.static(path.join(__dirname, "static")));app.get("/", (req, res) => {res.sendFile(path.join(__dirname, "static", "index.html"));app.listen(3000);CSS:.example_text {display: flex;flex-direction: column;justify-content: center;align-items: center;font-family: sans-serif;color: teal;}
Submitted July 20, 2020 at 04:54AM by the_mc_guy
Submitted July 20, 2020 at 04:54AM by the_mc_guy
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment