Good Tutorial for building a Socket.io example using Sails 0.10.x ...

1,401 views
Skip to first unread message

Gunish Rai Chawla

unread,
Aug 31, 2014, 12:47:23 AM8/31/14
to sai...@googlegroups.com
I went through the Sailscast episodes for websockets today, and I am feeling a little confused with all the major changes in the new version.
Does anyone know a good tutorial which can show me how to get an socket app running in sails 0.10.x ?

To Begin with I cant understand these things ...
1. Do I have to write any server side code to get the basic socket model working? My assumption is no, but i cant get it working anyways 
2. To subscribe to a model, should I change my client side code to always call, a socket.get on page load? I am trying to merge this concept with the activityOverlord example in sailscasts, if I did a client call onpageload, then I should not be rendering the contents of the page, e.g. list of users using server side code ? 
3. How to unsubscribe from a page, I dont want my users to continue to receive model updates once they have left the page ... 

Any help appriciated!

<G./>

John Tomaselli

unread,
Aug 31, 2014, 3:10:58 PM8/31/14
to sai...@googlegroups.com
Oscar Modina and myself built https://github.com/SharePointOscar/MEANS which is a good example of socket.io with angular.
HTH
John
Reply all
Reply to author
Forward
0 new messages