1

So I can't seem to find a way to use Socket.io and MEAN together. I can get it running in the latest version without errors with:

var server = app.listen(config.port, config.hostname);
io = io.listen(server);

But io, socket, doesn't have scope anywhere inside of Angular. I'm kind of new to all of this, so this might be a massive oversight on my part, but any insight to how I can overcome this would be appreciated.

howrad
  • 1,066
  • 2
  • 12
  • 32

3 Answers3

1

Look at btford/angular-socket-io on github Is an angular wrapper for client side socket.io.

klode
  • 10,821
  • 5
  • 34
  • 49
0

Express.IO is built for using the express framework in the MEAN stack along with Socket.IO

Shenal Silva
  • 1,955
  • 5
  • 26
  • 37
0

I've just responded to another SO post (Mean.io framwork with socket.io) for the same issue. Hope it helps.

Note: I'm using mean.io v0.5.26 and socket.io v1.1.0.

Community
  • 1
  • 1
Digitrance
  • 759
  • 7
  • 17