I am creating a node command line interface. It is installed globally and uses a bin file to execute.
I plan to have a command window open at the root directory of t
Here's what worked for me:
console.log(process.mainModule.filename);