Skip to content

Commit

Permalink
Use socket URL from the env -- all files in the UI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Raccoon254 committed Jun 9, 2024
1 parent 3b49292 commit 3e8bce3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<script>
//Get socket.io server from the .env file
const socketServer = '{{ env('SOCKET_URL') }}';
alert(socketServer)
//Connect to socket.io -- server
const socket = io(socketServer);
Expand Down
6 changes: 5 additions & 1 deletion resources/views/livewire/send-message-input.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ class="btn right-3 btn-primary ring-1 ring-offset-2 border rounded-lg btn-square

@script
<script>
const socket = io('http://localhost:3000');
//Get socket.io server from the .env file
const socketServer = '{{ env('SOCKET_URL') }}';
//Connect to socket.io -- server
const socket = io(socketServer);
// Send the username to the server on connection
let authUser = '{{ auth()->user() }}';
Expand Down

0 comments on commit 3e8bce3

Please sign in to comment.