node js get root directory of project code example
Example 1: nodejs fs root folder path
global.__basedir = __dirname;
Example 2: node get root directory
path.resolve("./")
global.__basedir = __dirname;
path.resolve("./")