Skip to content

Configurable Default Electron Port #504

Closed
@aarong-av

Description

@aarong-av

In many environments developers are not permitted to find available port. We must use specified ports allotted. Can we change the main.js file to include the following (~ line 66):

    let defaultElectronPort = 8000;
    if (manifestJsonFile.electronPort) {
        defaultElectronPort = (manifestJsonFile.aspCoreBackendPort)
    } 
    // hostname needs to belocalhost, otherwise Windows Firewall will be triggered.
    portscanner.findAPortNotInUse(defaultElectronPort, 65535, 'localhost', function (error, port) {
        console.log('Electron Socket IO Port: ' + port);
        startSocketApiBridge(port);
    });

This will allow users to explicitly set the port just as you can do with the aspNetCore port.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions