mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-20 03:59:36 +02:00
Fixed bug with overwriting opened tabs. Added proxy for websocket
This commit is contained in:
parent
936da301b8
commit
78de8752c6
9 changed files with 60 additions and 114 deletions
|
@ -50,7 +50,11 @@ const WeatherWidget = (): JSX.Element => {
|
|||
|
||||
// Open socket for data updates
|
||||
useEffect(() => {
|
||||
const webSocketClient = new WebSocket('ws://localhost:5005');
|
||||
const webSocketClient = new WebSocket(`ws://${window.location.host}/socket`);
|
||||
|
||||
webSocketClient.onopen = () => {
|
||||
console.log('Socket: listen')
|
||||
}
|
||||
|
||||
webSocketClient.onmessage = (e) => {
|
||||
const data = JSON.parse(e.data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue