The test still says: “Failed:Root level logger middleware should be active”
my Code:
app.use(“/”,function(req, res, next) {
console.log(${req.method} ${req.path} - ${req.ip}
);
next();
Console:
OPTIONS * - ::ffff:172.31.128.1
*
GET / - 64.71.144.196
*
GET / - 64.71.144.196
*
GET / - 78.48.127.110
*
GET /public/style.css - 78.48.127.110
Where is the mistake?
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Challenge: Basic Node and Express - Implement a Root-Level Request Logger Middleware
Link to the challenge: