hettlage (133) [Avatar] Offline
#1
The use of __dirname inListing 11.5 suggests that __dirname is (as stated in the text) equal to the application folder. However, according to https://nodejs.org/docs/latest/api/modules.html#modules_dirname, it is equal to current module folder.
TheWexler (56) [Avatar] Offline
#2
Sorry if I made that confusing. You're right! I'll clarify that section and offer more insight to the same documentation you provided. Thanks!
hettlage (133) [Avatar] Offline
#3
Thanks! - On a related note, you might make the section(s) on static files a bit clearer if you stressed that setting the directory with express.static does not affect sendFile, and if you pointed out how to use path.resolve when using setFile in a controller.