Can someone please help me figure out why none of the CSS files I linked are loading on my website? It's strange because the CSS for another page on the same site is loading without any issues.
My server is built using express and I'm using ejs as the templating engine.
Here is my EJS code:
<link rel="stylesheet" href="./CSS/header.css">
<link rel="stylesheet" href="CSS/index.css">
<link rel="stylesheet" href="CSS/threads.css">
<link rel="stylesheet" href="CSS/theme.css">
This is my server code written in Node.js:
app.use(express.static(__dirname + '/views'));
app.set('view engine', 'ejs')
.
.
.
app.get('/thread/:thread', (req, res)=>{
const thread_starter_html = get_thread_starter()
const thread_replies_html = get_thread_replies()
res.render('./thread.ejs', {thread_name: req.params.thread, thread_starter: thread_starter_html, thread_replies: thread_replies_html})
})
Here's the file structure of my project:
-/ Node Modules
|
-/ Views
| -/CSS
| | -|..<css files>
| -/JS
| | -|..<JS files>
| |
| -|..<ejs files>
|
-|server.js
..
..
These are the errors I'm encountering:
https://i.sstatic.net/FxPl9.png
I would greatly appreciate any assistance anyone can provide on this issue. Thank you.