Skip to content

Commit

Permalink
Merge pull request #7 from pedrolucas12/levantar-mao
Browse files Browse the repository at this point in the history
Configura servidor de ws
  • Loading branch information
weslley17w authored Sep 15, 2024
2 parents 528e0dd + 0fe6a4a commit 5659fde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ <h2 class="mdc-dialog__title" id="my-dialog-title">Join room</h2>
</div>

<script>
const ws = new WebSocket('ws://localhost:8080');

const urlHost = window.location.host;
const wsUrl = (urlHost === 'webrt-f83c2.web.app') ? 'wss://web-rtc-i6u8.onrender.com:8080' : 'ws://localhost:8080';
const ws = new WebSocket(wsUrl);
const messages = document.getElementById('messages');
const messageInput = document.getElementById('messageInput');
const username = prompt("Digite seu nome:");
Expand Down

0 comments on commit 5659fde

Please sign in to comment.