Get the current folder in Node
There are basically two ways to reference the current folder in a Node.js script: Along with ./, there is ../, which points to the parent folder. They behave in the same way. There is a big difference between the two. Using __dirname in a Node script will return the path of the folder where the current JavaScript file resides.
https://flaviocopes.com/node-get-current-folder/