You must follow this pattern: https://github.com/sockjs/sockjs-node/blob/master/examples/express-3.x/server.js
Pay close attention to the fact that calling app.listen
will NOT work, you must call server.listen
. So the .listen
call must be on the http instance, not on the express instance.