Web Development with Node and Express

Errata for Web Development with Node and Express

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
PDF, ePub, Mobi
Page xvi
2nd to last paragraph

As is: "Chapters 20 and 21 get your ready for the big day: your site launch." "get your ready" seems wrong. Instead, perhaps write "get your site ready", or possibly "get you ready".

Note from the Author or Editor:
Corrected.

Andreas Wachowski  Jan 01, 2015 
PDF
Page IX
United States

Sentence "Just having gotten back from a trip to Lisbon, travel is on my mind, so the exmaple website I have chosen is for a fictional travel company in my home state of Oregon (the Western Meadowlark is the state bird of Oregon)." The word "example" has a couple of letters transposed.

Note from the Author or Editor:
Change "exmaple" to "example".

Tom Bowersox  Mar 25, 2014 
ePub
United Kingdom

In Chapter 5 section: Cross-Page Testing There are a number of minor mistakes with the example which will cause it to fail or not work if followed word for word. 1: views/tours/hood-river.handlebars the href link in <a class= "requestGroupRate" href= "/request-group-rate"> should either be "./request-group-rate" or "tours/request-group-rate", the current example resolves to localhost:3000/request-group-rate which does not match with the routing in meadowlark.js 2: The cross site test for oregon coast tour should not have the referrer as "'http://localhost:3000/tours/hood-river'" as it then won't fail the test, "We’ll see that one of our tests is failing…it failed for the “Oregon Coast Tour” page, which should be no surprise, since we haven’t added that page yet.". It doesn't fail the test, as the test is wrong. Catch22- Who tests the tests!! 3: The command "mocha -u tdd -R spec qa/tests-crosspage.js 2>/dev/null" when run on osx will result in a silent failure, unless the user has added mocha as a global node module using - npm install mocha -g (is this just my setup causing these problems?)

Note from the Author or Editor:
Fixed.

Joseph McLoughlin  Apr 20, 2014 
PDF, ePub, Mobi
Page 10
7th line in 5th paragraph

Actual: "[...] (even simple functionaity like resizing [...]" Expected: "[...] (even simple functionality like resizing [...]"

Note from the Author or Editor:
Corrected.

Andreas Wachowski  Jan 01, 2015 
PDF, ePub, Mobi
Page 16
1st line

"Serving static resources with Node is suitable for developent [...]" developent -> development

Note from the Author or Editor:
Corrected.

Andreas Wachowski  Jan 01, 2015 
PDF
Page 16
Last sentence, 'Tip' inset

"You could change the route to be anything you want, and change the file to be anything you want. For example, if you had a different “about” page for each day of the week, you could have files public/about_mon.html, public/about_tue.html, and so on, and provide logic in your routing to serve the appropriate page when the user navigates to http://localhostd:8088/about" http://localhostd:8088/about should be http://localhost:8088/about

Note from the Author or Editor:
Fixed.

Anonymous  May 07, 2014 
PDF
Page 19
Second sentence of second paragraph of 'Scaffolding' section

The second sentence contains 'more a more' : "The advantage of this approach is that it could generate more a more sophisticated framework...".

Note from the Author or Editor:
Delete the first "more" so that it reads "...could generate a more sophisticated framework".

Anonymous  Mar 29, 2014 
PDF
Page 21
2nd 'tip' section

"It will make it easier to sport redirect issues in your code, or incorrect status codes, which are often overlooked. " Type in sport, presumably should be spot.

Note from the Author or Editor:
Fixed.

Anonymous  May 07, 2014 
PDF
Page 38
2nd paragraph in QA: Is It Worth It? section

There is: "In web development, quality can be broken down into three dimensions" It should be: "In web development, quality can be broken down into four dimensions"

Note from the Author or Editor:
Corrected.

PrzemysÅ‚aw DÄ…bek  Nov 02, 2014 
PDF
Page 39
2nd paragraph

There is: "Aesthetics is the most subjective of the three dimensions" It should be: "Aesthetics is the most subjective of the four dimensions"

Note from the Author or Editor:
Corrected.

PrzemysÅ‚aw DÄ…bek  Nov 02, 2014 
Printed
Page 42
3rd paragraph

"the property res.locals.showTests will set to be true" should be something like "the property res.locals.showTests will be set to true"

Note from the Author or Editor:
Corrected.

Anonymous  Nov 04, 2014 
PDF
Page 43
United States

On page 43 the text contains the following: Note that Mocha and Chai get included, as well as a script called /qa/global-tests.js However, in the code example just above on the same page it switches the word order in the file name: <script src="/qa/tests-global.js"></script> Further down on the same page, the text instructs you to create the tests-global.js file, so it appears this is a typo.

Note from the Author or Editor:
Corrected.

Greg Hendricks  Jul 30, 2014 
PDF, ePub, Mobi
Page 46
Third test in the 'Cross-Page Tests' code

In the code line test('visiting the "request group rate" page dirctly should result ' + change "dirctly" to "directly"

Note from the Author or Editor:
Typo corrected by author.

Andreas Wachowski  Jan 13, 2015 
PDF, ePub, Mobi
Page 51
8th line from bottom of page (excl. the footnote)

In "..., makes it a little easier to manager.", change "manager" to "manage".

Note from the Author or Editor:
Thanks for catching this! It's been corrected.

Andreas Wachowski  Jan 13, 2015 
PDF
Page 59
in the middle of page

There is: res.set('Content-Type', 'text/plain\') It should be: res.set('Content-Type', 'text/plain')

Note from the Author or Editor:
Corrected.

PrzemysÅ‚aw DÄ…bek  Nov 03, 2014 
Printed
Page 64
United States

There should be no right paren after '/api/tours' in Example 6-11: app.get('/api/tours'), function(req, res){ res.json(tours); });

Note from the Author or Editor:
Corrected.

Joey Di Nardo  Nov 22, 2014 
Printed
Page 65
Example 6-13

var p = tours.some(function(p){return p.id == req.params.id }); if (p) { if (req.query.name) p.name = req.query.name; if (req.query.price) p.price = req.query.price; properties p.name and p.price cannot be assigned due to p holding a boolean literal returned from Array.prototype.some()

Note from the Author or Editor:
Corrected. Since Array.prototype.find isn't available yet in ES5, I replaced this with Array.prototype.filer and then pulled off the first element (which will be undefined if no tour found).

Joey Di Nardo  Nov 22, 2014 
ePub
Page 70
United Kingdom

In the list item: "lib/request.js Exetnds Node’s http.IncomingMessage object to provide a robust request object. For information about all the request object properties and methods, this is where to look." Extends is misspelt.

Note from the Author or Editor:
Fixed.

Joseph McLoughlin  Apr 20, 2014 
PDF
Page 94
code snippet

There is: year: now.getFullYear(),month: now.getMont() It should be: year: now.getFullYear(), month: now.getMonth()

Note from the Author or Editor:
Corrected.

PrzemysÅ‚aw DÄ…bek  Nov 03, 2014 
, Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version
Page 114
4rd paragraph

The command(s) in the paragraph states: body-parser (npm install --save body-parser, app.use(require(bbody- parser)());) Note the typo in 'bbody'. It should be: body-parser (npm install --save body-parser, app.use(require(body- parser)());) Also, please add a newline like the rest of the middleware (makes it a bit clearer): body-parser (npm install --save body-parser, app.use(require(body- parser)());)

Note from the Author or Editor:
Corrected -- left on one line for formatting reasons.

Tito Ciuro  Aug 31, 2014 
PDF
Page 131
last line

There is: "the increased poularity of cloud computing" It should be: "the increased popularity of cloud computing"

Note from the Author or Editor:
Corrected.

PrzemysÅ‚aw DÄ…bek  Nov 05, 2014 
Printed
Page 144
12th line of the code block

if(err) return res.redirect(303,'/error'); This line should be removed, otherwise the second error handler (which is more extensive) would never fire.

Note from the Author or Editor:
Corrected.

Bart Louwers  Dec 10, 2014 
Printed
Page 144
19th line of code block

Pelase -> Please

Note from the Author or Editor:
Corrected.

Bart Louwers  Dec 10, 2014 
Printed
Page 146
3rd paragraph

'Traditionally, the world "database"' should read 'Traditionally, the word "database"'

Note from the Author or Editor:
Corrected.

Anonymous  Nov 06, 2014 
PDF
Page 212
Deutschland

In the chapter "Security" you are describing how to purchase a private key. At the end of the chapter the generated private key is downloaded (via HTTPS) from the signing company. In my opinion the public/private key-pair should always be generated by yourself and only a certificate signing request (CSR) should be sent to the signing authority. Otherwise you can't be sure that you are the only one knowing this private key. I haven't checked with all certificate signing providers, but with all the providers I had business with, they accept only CSRs, and don't generate a private key for you.

Note from the Author or Editor:
Corrected.

Ulf J�hrig  Jul 08, 2014 
ePub
Page 228
2nd code sample

in the middleware function to demonstrate cluster usage the next function is not called from within the function and this causes the server execution to stall. adding next(); prior to the closing braces resolves this issue.

Note from the Author or Editor:
Corrected.

Anonymous  Aug 11, 2014 
PDF
Page 228
Bulgaria

"Twitter" pop-ups out of nowhere in the middle of integrating Facebook authentication. "Now we have the path /auth/facebook; visiting this path will automatically redirect the visitor to Facebook’s authentication screen (this is done by passport.authenticate('facebook')), step 2 in Figure 18-1. Note that we override the default callback URL here: this is because we want to include information about where we came from. Since we’re redirecting the browser to Twitter for authentication, we might want some way to come back to where we started. Once the user authorizes with Twitter, the browser will be redirected back to your site."

Note from the Author or Editor:
Corrected.

Mario Georgiev  Nov 14, 2014 
PDF
Page 233
Bulgaria

"...the ability to tweet abut the page you're on..." "abut" probably should be "about"?

Note from the Author or Editor:
Corrected.

Mario Georgiev  Nov 14, 2014