HomeAbout

__dirname

__dirname returns absolute path of the directory containing the currently executing file.

Points to where the code/file is stored in the repository file structure.

vs process.cwd()

process.cwd() returns the value of directory where we run the process.

It will return the current directory of the terminal calling the script.

AboutContact