diff --git a/src/app.js b/src/app.js index 81d7798af3..8926d9e90c 100644 --- a/src/app.js +++ b/src/app.js @@ -137,7 +137,7 @@ class App { registry.put({api: self._components.filesProviders['browser'], name: 'fileproviders/browser'}) registry.put({api: self._components.filesProviders['config'], name: 'fileproviders/config'}) - var remixd = new Remixd() + var remixd = new Remixd(65520) registry.put({api: remixd, name: 'remixd'}) remixd.event.register('system', (message) => { if (message.error) toolTip(message.error) diff --git a/src/lib/remixd.js b/src/lib/remixd.js index 83bc487e0d..47e92582e2 100644 --- a/src/lib/remixd.js +++ b/src/lib/remixd.js @@ -4,8 +4,9 @@ var modalDialog = require('../app/ui/modaldialog') var yo = require('yo-yo') class Remixd { - constructor () { + constructor (port) { this.event = new EventManager() + this.port = port this.callbacks = {} this.callid = 0 this.socket = null @@ -30,7 +31,7 @@ class Remixd { } catch (e) {} } this.event.trigger('connecting', []) - this.socket = new WebSocket('ws://localhost:65520', 'echo-protocol') // eslint-disable-line + this.socket = new WebSocket('ws://localhost:' + this.port, 'echo-protocol') // eslint-disable-line this.socket.addEventListener('open', (event) => { this.connected = true