const path = require('path');

function getProjectDirectory() {
    if (process.pkg) {
        return path.dirname(process.argv[0]);
    } else {
        return path.join(path.dirname(process.argv[1]), '..');
    }
}

module.exports = {
    port: (+process.env.RPNOW_PORT) || 13000,
    trustProxy: (process.env.RPNOW_TRUST_PROXY || '').toLowerCase() === 'true',
    dataDir: (process.env.RPNOW_DATA_DIR) || path.join(getProjectDirectory(), './data'),
};

@@ -22,16 +22,42 @@
 'path');
+%0Aconst os = require('os');
 %0A%0Afuncti
@@ -62,23 +62,20 @@
 tion get
-Project
+Data
 Director
@@ -88,90 +88,66 @@
     
-if (process.pkg) %7B%0A        return path.dirname(process.argv%5B0%5D);%0A    %7D else %7B
+const userData = process.env.APPDATA %7C%7C os.homedir()
 %0A    
+%0A
     
@@ -167,51 +167,32 @@
 oin(
-path.dirname(process.argv%5B1%5D), '..');%0A    %7D
+userData, 'rpnow_data');
 %0A%7D%0A%0A
@@ -385,49 +385,25 @@
  %7C%7C 
-path.join(getProjectDirectory(), './data'
+getDataDirectory(
 ),%0A%7D

Store rpnow data in home directory instead of application directory