I have the following code in my app.js file:
app.use(express.static(`public`));
And in my HTML, I'm including a stylesheet like this:
<link rel = `stylesheet` href = `css/styles.css`/>
However, none of the styles from the stylesheet seem to be applied. What should I do?
This is a snippet of my HTML:
<!DOCTYPE html>
<html lang = `en` dir = `ltr`>
<head>
<meta charset = `utf-8` />
<script src="https://kit.fontawesome.com/51479f1cdc.js" crossorigin="anonymous"></script>
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0f6d60607b7c7b7d7b6c7f4f3a213d213f226d6a7b6e3e">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<link rel = `stylesheet` href = `css/styles.css`/>
<title>Starting Files</title>
</head>
<body>
<div class = `container full-height-container`>
<div class = `home-container`>
<i class = `fas fa-key fa-6x`></i>
<h1 class = `display-3 heading`>Secrets</h1>
<p class = `lead`>
Don't keep your secrets, share them anonymously.
</p>
<hr/>
<div class = `button-container`>
<a class = `btn btn-primary btn-lg` href = `/register` role = `button`>Register</a>
<a class = `btn btn-dark btn-lg` href = `/login` role = `button`>Log in</a>
</div>
</div>
</div>
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b7d5d8d8c3c4c3c5d6c7f78299859987aad5d2c3d686">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script>
</body>
</html>
Inside the public folder, there is a subfolder named css which contains a file called styles.css.