I am not getting this solution

Tell us what’s happening:
i tried different ways it is showing me error all the time could any one please help me.

Your code so far

app.get("/",function (req,res,next){
  console.log("${req.method} ${req.path} - ${req.ip}");
  next();
})

Your browser information:

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

Challenge: Implement a Root-Level Request Logger Middleware

Link to the challenge:

Can you please share a link to your full project code? You should not be using the get method here. You should be using the use method to mount the Logger Middleware.

I think your’re suppose to send back the method, path and ip as response instead of logging it to the console.

Try

app.get("/", function (req, res, next) { res.send("${req.method} ${req.path} - ${req.ip}"); next(); })