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.

jipis (2) [Avatar] Offline
In the middle of page 69, the snippet from the existing app.js file has

var routes = require('./routes/index');

However, my installation of express has that line as

var index = require('./routes/index');

Could this be a change between versions? Appendix A says you've installed 4.14.0. I have 4.15.0. This seems like a more significant change than you'd expect between minor revisions?
jipis (2) [Avatar] Offline
For the record, the code in github (see also has index.
Joerg Jooss (9) [Avatar] Offline
I guess this is a somewhat recent change in express-generator. BTW, have a look at p179, section "Including the routes in the application". Here it also says index, not routes smilie.
simon.holmes (148) [Avatar] Offline
Hi all

Yes, it should be index, not routes. It was a typo on my part. I sometimes change it to "routes" in my projects, but haven't here.

I've made a note of it and will update the chapter soon.