Tell us what’s happening:
I tried writing code and it’s the same as it is given in the hint but my code is not working and my tests are not validating.
Here is my Code:
app.use(“/public”, express.static(__dirname + “/public”));
app.get(“/”, (req, res) => {
res.sendFile(__dirname + “/views/index.html”);
});
PS: I accidentally clicked the submit button in my previous challenge.
Your project link(s)
solution: https://boilerplate-express--tarunnakka30.repl.co
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0
Challenge Information:
Basic Node and Express - Serve Static Assets