Basic Node and Express - Serve Static Assets

Tell us what’s happening:

I have implemented as everyone did, but the challenge did not pass. Please help!

app.get("/", function (req, res) {
  const absolutePath = __dirname + "/views/index.html";

app.use(express.static(__dirname + "/public"));

###Your project link(s)


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge Information:

Basic Node and Express - Serve Static Assets

You need the mount path.

A middleware needs to be mounted using the method app.use(path, middlewareFunction) .

Mount the express.static() middleware to the path /public with app.use() .

Look at the docs for examples of how to use it.