Root-Level Request Logger Middleware - Lesson won't pass

My Repl link is:

The code I’ve used is:

var express = require(‘express’);
var app = express();

// --> 7) Mount the Logger middleware here
app.use((req, res, next) => {
console.log(req.method, " ", req.path, " - ", req.ip);

When I submit my URL ( on the Lesson page (, logging for freecodecamp appears in the Logs, but on the lesson page it says ‘Root level logger middleware should be active’

Can anyone help me understand what is missing please?

I pasted (after I ran the project) into the lesson submission blank and ran the test and it passed, even though I can’t see the output on the console. The only difference between my code and yours is that I have a root path in my use() function.

I’ve seen others this weekend that had problems with being down intermittently, so maybe that was it. Just make sure you use the live project link and have the project running before testing. The code looks correct, but make sure you surround code in your posts with backticks or use the preformatted text button.

Thanks for your reply.

I think you were right, when I came back to check again, the test passed. does seem a bit hit and miss!