kmakarychev
kmakarychev

Reputation: 731

Sails.js with native WebSockets

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.

Upvotes: 9

Views: 2060

Answers (2)

L.rp
L.rp

Reputation: 943

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

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

Upvotes: 1

kmakarychev
kmakarychev

Reputation: 731

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

Upvotes: 3

Related Questions