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

Filename argument belongs to module wrapper function and it stores the module name including the absolute path to the file.

#node#module
console.log("Filename: " + __filename);
copy
Full Node cheatsheet