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.

hettlage (136) [Avatar] Offline
The use of __dirname inListing 11.5 suggests that __dirname is (as stated in the text) equal to the application folder. However, according to, it is equal to current module folder.
TheWexler (62) [Avatar] Offline
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 (136) [Avatar] Offline
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.