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

Tell us what’s happening:
Unable to pass the test, I’m getting:

Root level logger middleware should be active

I’ve tried locally and it works fine, I’m getting:

GET /json ::1
*
GET /public/style.css ::1
*
GET / ::1

I’ve then tried with Replit, see here: boilerplate-express (2) - Replit

It works too:

Node is listening on port 3000…
*
GET / 62.253.153.163
*
GET /public/style.css 62.253.153.163
*
GET /json 62.253.153.163

*
GET /json 34.148.141.206

Your project link(s)

solution: boilerplate-express (2) - Replit

Your browser information:

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

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

Link to the challenge:

On line 8 of myApp.js, you do this: console.log(req.method + " " + req.path + " " + req.ip). This is incorrectly formatted.

HINT: Your error is after req.path and before req.ip.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.