Robert Hieger (1) [Avatar] Offline
#1
Source Code
[ 5 KB ]
I have just finished inputting the server.js code in Chapter 2, pages 81-85 in the ePub edition of the book.

I am pretty much a newbie to Node.js, but have an advanced beginner's familiarity with JavaScript, including some things associated with the ECMAScript 6 standard.

When I tested server.js, using both the URLs of 127.0.0.1:3000 and http://localhost:3000/, I received a 'Refused Connection' Error from Google Chrome. I have attached a screenshot of that message for reference.

The only thing differing in my code from that appearing in the book is the inclusion of my customized embedded documentation, and exceedingly minor variation in the 404 error message specified by server.js. To be complete, I am attaching my version of server.js.

Any enlightenment or assistance on this issue would be greatly appreciated.

Sincerely,

Robert Hieger

P.S. I just noticed that I am actually working with the first edition of the book. Hopefully this question is still answerable.