Get Current File Path in Node

The __filename constant will print out the current file path in NodeJS

console.log(__filename); // /location/on/computer/or/server/filename.js

More info on node globals can be found here: Node Globals