mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-06-28 06:35:13 +00:00
Do not hardcode WebSocket URL
This commit is contained in:
@ -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),
|
||||
|
Reference in New Issue
Block a user