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

Tell us what’s happening:
Hello, I managed to log the method and path of the request but the ip seems a little bit off. It only prints ::1

Below is a screenshot of it. Am I missing something? When I submit my URL in the solution, the test passed but the solution isn’t as expected.

Your project link(s)

solution: http://localhost:3000

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

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

Link to the challenge:

Your code doesn’t require the console.log at line 17 - it is not part of the challenge.

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