I am having a lot of trouble with my serverside JS code for a school project. We're doing web design, and I'm trying to add css files into my serverside JS. Is there a way to call the dirname and have css, the images, and the HTML files at once?
Here is some of my code.
app.get("/",function(req,res) {
res.sendFile(path.resolve(__dirname,"index.html"));
});
app.get("/player",function(req,res) {
res.sendFile(path.resolve(__dirname,"player.html"));
});
Can I call more than one file using the app.get function? Is there another way?