Reputation: 26402
I wish to store the directory my node.js script has been run from in a variable, how would I do this?
The fs module documentation doesn't seem to hold an answer to this.
Upvotes: 0
Views: 64
Reputation: 3485
What you are looking for is __dirname
: http://nodejs.org/docs/latest/api/globals.html#globals_dirname
Upvotes: 1