I have a `views` directory that I made static by using `app.use(express.static('views'))`. The views directory consists of subfolders as listed below-
views
|-homepage/
| |-homepage.ejs
| |-homepage.css
| |-homepage.js
|
|-partials/
| |-navbar.ejs
| |-footer.ejs
|
|-playground/
| |-playground.ejs
| |-playground.css
| |-playground.js
I rendered the homepage and noticed that the CSS was not displaying correctly, because I did not specify `./views/homepage` as static.
Although it is currently not an issue since I only have a few pages to render, if in the future I plan to create dynamic directories, I am unsure how to make their respective folders static.
Is there a way to declare a folder as static and have all its subdirectories automatically become static as well? I have heard people mention that once the parent folder is marked as static, all subdirectories also become static which makes sense, as my homepage.ejs was displayed properly (albeit without CSS), but I had to specifically add `app.use(express.static('./views/homepage'))` for the CSS to render on my homepage.
Thank you in advance!