remove port scanning for an available port #3036

This commit is contained in:
zadam
2022-08-03 00:19:29 +02:00
parent f161488c13
commit 8588ed5eec
6 changed files with 17 additions and 41 deletions

View File

@@ -35,7 +35,7 @@ async function createExtraWindow(notePath, hoistedNoteId = 'root') {
});
win.setMenuBarVisibility(false);
win.loadURL('http://127.0.0.1:' + await port + '/?extra=1&extraHoistedNoteId=' + hoistedNoteId + '#' + notePath);
win.loadURL(`http://127.0.0.1:${port}/?extra=1&extraHoistedNoteId=${hoistedNoteId}#${notePath}`);
configureWebContents(win.webContents, spellcheckEnabled);
}
@@ -77,7 +77,7 @@ async function createMainWindow(app) {
mainWindowState.manage(mainWindow);
mainWindow.setMenuBarVisibility(false);
mainWindow.loadURL('http://127.0.0.1:' + await port);
mainWindow.loadURL('http://127.0.0.1:' + port);
mainWindow.on('closed', () => mainWindow = null);
configureWebContents(mainWindow.webContents, spellcheckEnabled);
@@ -143,7 +143,7 @@ async function createSetupWindow() {
});
setupWindow.setMenuBarVisibility(false);
setupWindow.loadURL('http://127.0.0.1:' + await port);
setupWindow.loadURL('http://127.0.0.1:' + port);
setupWindow.on('closed', () => setupWindow = null);
}