Using,
var nwPath = process.execPath;
var nwDir = path.dirname(nwPath);
console.log(nwDir);
in a Node-Webkit application would give me something like:
C:\Users\USERNAME\AppData\Local\Temp
What would give me the directory from within the Node-Webkit application runs the html files from?
Like,
C:/Users/USERNAME/AppData/Local/Temp/nw6860_18341/
In NW you can just use process.cwd()