set port in remixd ctor

pull/3094/head
yann300 6 years ago
parent 0c6c113700
commit 01de9d77d0
  1. 2
      src/app.js
  2. 5
      src/lib/remixd.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)

@ -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

Loading…
Cancel
Save