]> Repos - mime-chat/commitdiff
fixed isPackaged issue
authorAndrew Gundersen <gundersena@xavier.edu>
Tue, 8 Mar 2022 13:45:14 +0000 (07:45 -0600)
committerAndrew Gundersen <gundersena@xavier.edu>
Tue, 8 Mar 2022 13:45:14 +0000 (07:45 -0600)
src/config.js

index 21219611483414131ffdb04f0b897dadec28febc..61dfdfd1502a6cb3f5c9c3fdc9baafa84d38e6cf 100644 (file)
@@ -2,9 +2,11 @@ const { app } = require("electron");
 
 const DOMAIN = "crimata.com";
 
+const prod = !process.defaultApp;
+
 module.exports = {
 
-PLATFORM: app.isPackaged ? `http://app.${DOMAIN}` : `http://localhost:8760`,
-API: app.isPackaged ? `https://${DOMAIN}/api` : `http://localhost:8761`
+PLATFORM: prod ? `http://app.${DOMAIN}` : `http://localhost:8760`,
+API: prod ? `https://${DOMAIN}/api` : `http://localhost:8761`
 
 }