Tell us what’s happening:
Describe your issue in detail here.
Hello guys,
I got a problem about build a simple logger.
My code below
app.use((req, res, next) => {
var string = req.method + " " + req.path + " - " + req.ip;
console.log(string);
next();
});
I can’t find the error in my code, can anyone help me?
Your project link(s)
solution: https://replit.com/@cmai1/boilerplate-express-1
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36
Challenge: Implement a Root-Level Request Logger Middleware
Link to the challenge: