jipis (2) [Avatar] Offline
#1
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
#2
For the record, the code in github (see https://github.com/simonholmes/getting-MEAN-2/blob/master/app.js) also has index.
Joerg Jooss (9) [Avatar] Offline
#3
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
#4
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.

Thanks!
Simon