node.js - AngularJS: chat app with socket.io over https -


i running example chat app https://github.com/btford/angular-socket-io-im uses socket.io/angular/node make basic im client.

however run trouble when try make work on https.

no socket events caught on server, no chat messages sent clients , users can't join rooms. error on client in socket.io.js:

uncaught typeerror: cannot call method 'onclose' of null   

i've created express https server listening on port 8000 , modified socket definition :

 var socket = io.connect('https://localhost:8000',{secure: true, port:8000}); 

both in js/services.js , in /bower_components/angular-socket-io/socket.js

not quite sure how go fixing this. in advance!

i have app exact same thing :) uses socket io , uses :8080 need make sure security cert registering both https://localhost , https://localhost:8000 , has been added keychain otherwise page load socket connections fail.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -