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

Tell us what’s happening:
Hello.

I’m unable to pass challenge 7. What could I be doing wrong?

Here’s my code:

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

Your project link(s)

solution: boilerplate-express-3 - Node.js Repl - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 11; TECNO LC7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Mobile Safari/537.36

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

Link to the challenge:

You have removed the export from the bottom of the myApp.js file.

module.exports = app;
1 Like

Oh goodness!

I must have inadvertently erased it. I’ll see to that.

Thank you.