1. Home
  2. ›
  3. Node
  4. ›
  5. Module dirname

Dirname argument belongs to module wrapper function and it stores the absolute path to the module.

#node#module
console.log("Module directory: " + __dirname);
copy
Full Node cheatsheet