Merge pull request #1245 from jfenske89/main

Support a custom port number via optional CIDER_PORT variable
This commit is contained in:
Core 2022-07-13 14:12:36 +01:00 committed by GitHub
commit f8d5e5d08d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -372,7 +372,8 @@ export class BrowserWindow {
* @yields {object} Electron browser window * @yields {object} Electron browser window
*/ */
async createWindow(): Promise<Electron.BrowserWindow> { async createWindow(): Promise<Electron.BrowserWindow> {
this.clientPort = await getPort({ port: 9000 }); const envPort = process.env?.CIDER_PORT || '9000'
this.clientPort = await getPort({ port: parseInt(envPort, 10) || 9000 });
BrowserWindow.verifyFiles(); BrowserWindow.verifyFiles();
this.StartWatcher(utils.getPath('themes')); this.StartWatcher(utils.getPath('themes'));