I am running this example chat app https://github.com/btford/angular-socket-io-im that uses socket.io/angular/node to make a basic im client.
However I run into trouble when I try to make it work over https.
No socket events are caught on the server, so no chat messages are sent to clients and users can't join rooms. I also get this error on the client in socket.io.js
:
Uncaught TypeError: Cannot call method 'onClose' of null
I've created an express
https
server listening on port 8000
and modified the socket definition to :
var socket = io.connect('https://localhost:8000',{secure: true, port:8000});
both in js/services.js
and in /bower_components/angular-socket-io/socket.js
Not quite sure how to go about fixing this. Thanks in advance!
I have an app that does this exact same thing :) uses socket io and uses :8080 you will need to make sure your security cert is registering that both https://localhost
and https://localhost:8000
and has been added to your keychain otherwise the page will load but your socket connections will fail.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With