In some Express example, I see there are two ways to define directory to store view file.
app.set('views', __dirname + '/views');
My question is: Are there any differences for above two methods ? I have run and see no different effect.
__dirname repersent the current directory in which your app.js file is present. Also . also repersent current directory in which your app.js present. Difference is that using two dots e.g ../anyFolderName you will move one directory upwith respect to current directory. __dirname isn't actually a global but rather local to each module.Hope now difference will be clear to you