to get path of project in node js code example Example: nodejs fs root folder path global.__basedir = __dirname;