9

I want to make public WebSocket API with sails.js. So I'd like to use native WebSockets instead of the built-in socket.io but with Sails.js controllers and models. Is it possible? Maybe I can implement custom transport or something else. Thanks for any help.

Travis Webb
  • 14,688
  • 7
  • 55
  • 109
kmakarychev
  • 731
  • 4
  • 14

2 Answers2

3

I implemented WebSockets support for Sails.js as a custom hook: https://github.com/provectus/sails-userhooks-ws

kmakarychev
  • 731
  • 4
  • 14
1

Using raw socket.io functionality in a Sails.js controller

https://gist.github.com/mikermcneil/6598661

L.rp
  • 893
  • 1
  • 7
  • 11