node js find root file of project code example Example: nodejs fs root folder path global.__basedir = __dirname;