As mentioned in https://stackoverflow.com/a/32556337/103396, require('os').homedir()
is the way to get the user's home directory.
In Windows the desktop path would be on user_home_dir/Desktop
:
require('path').join(require('os').homedir(), 'Desktop')
Will this work on other platforms?