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,134
  • 6
  • 53
  • 104
kmakarychev
  • 721
  • 3
  • 14

2 Answers2

3

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

kmakarychev
  • 721
  • 3
  • 14
1

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

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

L.rp
  • 783
  • 1
  • 5
  • 11