Skip to content
Advertisement

Laravel socket.io doesn’t work, failed socket connect, how to fix?

I am trying to create a live chat. Socket.io and node.js I can’t connect the user to my channel. https://domen.com:8005/socket.io/?EIO=3&transport=polling&t=NYHmcgH :failed

Here is my server.js

JavaScript

and here is my blade template

JavaScript

Advertisement

Answer

express with https needs some keys

JavaScript

i think you should try first with http, if your code works well then you can upgrade to https

JavaScript

in client side :

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement