2020-05-07 14:33:25 +02:00
|
|
|
const { app, BrowserWindow } = require('electron');
|
2020-05-11 15:50:15 +02:00
|
|
|
const { join } = require("path")
|
|
|
|
const { homedir } = require("os")
|
2020-05-07 14:33:25 +02:00
|
|
|
|
2020-05-11 15:50:15 +02:00
|
|
|
require("dotenv").config({ path: join(homedir(), ".budibase", ".env") })
|
2020-05-07 14:33:25 +02:00
|
|
|
|
2020-05-07 14:52:24 +02:00
|
|
|
const DEV_URL = "http://localhost:4001";
|
|
|
|
|
2020-05-07 14:33:25 +02:00
|
|
|
function createWindow() {
|
2020-05-07 15:04:32 +02:00
|
|
|
app.server = require("./app");
|
2020-05-07 14:33:25 +02:00
|
|
|
let win = new BrowserWindow({ width: 1920, height: 1080 });
|
2020-05-07 14:52:24 +02:00
|
|
|
win.loadURL(DEV_URL);
|
2020-05-07 14:33:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
app.whenReady().then(createWindow)
|