Basic Node and Express - Implement a Root-Level Request Logger Middleware

Tell us what’s happening:

I have place my middleware logger right after var app = express() here is my code which is similar to everyone elses but my test does not pass? // Root level logger middleware

app.use((req, res, next) => {
  console.log(`${req.method} ${req.path} - ${req.ip}`); 
  next(); 
});

###Your project link(s)

solution: https://freecodecam-boilerplate-ubvj4bwgn6m.ws-us117.gitpod.io

Your browser information:

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

Challenge Information:

Basic Node and Express - Implement a Root-Level Request Logger Middleware

Welcome to the forum @orlandomendozagarrid

Try restarting the server.

Happy coding

Your code is passing for me.

Please share a Gitpod snapshot so we can see all the code.


You could also try it locally instead.