Skip to content

Commit

Permalink
Merge pull request #20 from Microarchitecturovisco/RSWW-143-use-.env-…
Browse files Browse the repository at this point in the history
…params-in-websockets

RSWW-143 change websocket configs
  • Loading branch information
Danzigerrr authored Jun 9, 2024
2 parents 6181cca + 9826685 commit 5b41ad2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tour-operator-updates/screens/TOUpdates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const TOUpdates = () => {
const [transportUpdates, setTransportUpdates] = useState<TransportUpdate[]>([]);

useEffect(() => {
const hotelWs = new WebSocket(`ws://localhost:8082/data-generator/ws/hotel`);
const transportWs = new WebSocket(`ws://localhost:8082/data-generator/ws/transport`);
const hotelWs = new WebSocket(`ws://${process.env.REACT_APP_API_HOSTNAME}:${process.env.REACT_APP_API_PORT}/data-generator/ws/hotel`);
const transportWs = new WebSocket(`ws://${process.env.REACT_APP_API_HOSTNAME}:${process.env.REACT_APP_API_PORT}/data-generator/ws/transport`);

hotelWs.onmessage = (event) => {
console.log("Received hotel message: " + event.data);
Expand Down

0 comments on commit 5b41ad2

Please sign in to comment.