Get your own Node server
var path = require('path');
//Return the directries:
var directories = path.dirname('/Users/Refsnes/demo_path.js');
console.log(directories);

              

/Users/Refsnes