Do not hardcode WebSocket URL

This commit is contained in:
Bálint Bokros 2018-01-11 16:12:32 +01:00
parent 2328162ffc
commit 89cc0fca1c

View File

@ -31,7 +31,7 @@ export class WebSocketService {
// observer subscribes. This socket is shared with subsequent observers
// and closed when the observer count falls to zero.
this.downlink = jsonWebsocketConnect(
'ws://localhost:4242/ws',
'ws://' + window.location.host + '/ws',
this.uplink = new QueueingSubject<object>()
).messages.pipe(
map(message => <WSMessage<undefined>> message),