Let's say I have a node.js with Express project with the following directory:
server.js
package.json
views
index.ejs
css
style.css
js
script.js
video
vid.mp4
img
bg.png
When I try to run this project my index.ejs shows up, but the rest of the files in the views folder don't show up. How can I fix this?
Thanks in advance!
Use static() method in express
app.use(express.static(__dirname + '/views'));