-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
32 lines (26 loc) · 798 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const { app, BrowserWindow, ipcMain, Notification } = require("electron");
const path = require("path");
const isDev = !app.isPackaged;
function createWindow() {
const win = new BrowserWindow({
width: "1200",
height: "800",
minWidth: 750,
minHeight: 600,
backgroundColor: "white",
webPreferences: {
nodeIntegration: false,
worldSafeExecuteJavaScript: true,
contextIsolation: true,
preload: path.join(__dirname, "preload.js"),
},
});
win.loadFile("index.html");
}
if (isDev) {
require("electron-reload")(__dirname, {
electron: path.join(__dirname, "node_modules", ".bin", "electron"),
});
}
app.whenReady().then(createWindow);
// const {getFowardingTable, getLeastCostPathsTable} = require("./build/Release/native_ospf.node");