Problem:
Root level logger middleware should be active
I looked at previous posts with the same issue and couldn’t figure out the solution. I already tried npm update --save
My code is the same as other users, and I put the route before the other routes. It does print to the console when I visit localhost:3000. What could be the issue?
The short answer is yes you do not need www with localhost.
Not 100% sure why it crashes. Technically, localhost should resolve to 127.0.0.1 (loopback). The error with getaddrinfo likely means it’s related to Node doing a resolve of the address. If you just enter http://www.localhost:3000/ in the browser it doesn’t crash the server but when the test hits that it does crash it. Like I said I’m not actually sure why it is crashing but it seems like it can’t resolve the address.