The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

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 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.


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.