I generated a node.js app using Yeomans angular-fullstack generator. Everything worked fine except the use of socket.io. After uploading my app to openshift using angular-fullstack:openshift, I got informed that I have to:
Openshift websockets use port 8000, you will need to update the client to connect to the correct port for sockets to work. in
/client/app/components/socket/socket.service
: var ioSocket = io.connect('http://my-domain.rhcloud.com/:8000')"
I dont know where to do this. I am using socket.io version 1.0.6 which is shown inside package.json file.
==> app-root/logs/nodejs.log <== /var/lib/openshift/xxx/app-root/runtime/repo/server/config/socketio.js:41 socket.address = socket.handshake.address.address + ':' + ^ TypeError: Cannot read property 'address' of null at Namespace. (/var/lib/openshift/xxx/app-root/runtime/repo/server/config/socketio.js:41:46) at Namespace.EventEmitter.emit (events.js:95:17) at Namespace.emit (/var/lib/openshift/xxx/app-root/runtime/repo/node_modules/socket.io/lib/namespace.js:205:10) at /var/lib/openshift/xxx/app-root/runtime/repo/node_modules/socket.io/lib/namespace.js:172:14 at process._tickCallback (node.js:415:13) DEBUG: Program node server/app.js exited with code 8 DEBUG: Starting child process with 'node server/app.js'
By the way, the app, including socket.io, works fine on my local development machine!
Thanks for any help! Fall.Guy