Search code examples
node-webkit

Accessing/ referencing external files in node-webkit application


I'm developing a node-webkit application that i want to distribute as an .exe file. However. I need to have dynamic content editable by the end user would i be able to link/ reference to external files and folders in my html/ css file using a relative path( maybe if i designate a particle folder)


Solution

  • A packed node-webkit application can identify its starting folder this way:

    var appDir = require('path').dirname(process.execPath);