Need definitive and working way to use socketio

Skip to first unread message

Darryl Porter

Dec 24, 2013, 10:17:39 PM12/24/13
I been stumbling with locomotive for about a week now. My main attraction is that it is the "fullest" full stack frameworks for nodejs. However, my attraction to node is the ability to build real-time apps with socketio.

Over the last few days I have read everything out there on locomotive and socketio integration and have found nothing that works in a way that makes since.

Could someone please give a full example of how to use these two together.

Jared Hanson

Dec 25, 2013, 1:01:41 PM12/25/13
Could you provide some details as to what you've read/tried, as well as how you would expect it to work?

I'd love to see further integration in this area.  However, I find that other frameworks trying to unify RESTful and real-time approaches tend to not do either very well.  In my own apps, where I need to support both models, I tend to have minimal Locomotive controllers and real-time handlers sharing a set of common libraries.  This tends to work well.

There are some common patterns to abstract from that work, but I haven't quite teased them out in a way I'm satisfied with.  Until then, though, I think its best to stay focused on doing one thing, and doing it well.  But, I'd love to see further discussion on this topic, and how integration could be done effectively.


You received this message because you are subscribed to the Google Groups "Locomotive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Jared Hanson <>

Darryl Porter

Dec 26, 2013, 9:43:40 AM12/26/13
Thanks for your response.

I read this thread:

And this one:

Ideally, I'd like to create a custom boot function for creating the web server with  socketio support. In that, I'd like to attach the socketio instance to the application instance with something like this:

var socketio = require('');
locomotive.boot(function() { = socketio.listen(this.server);//Or whatever the server instance is.
And from a controller be able to grab the "".
Is something like this possible. My example is simplistic, but hopefully you understand what I'd like to attempt.


Ka Yuk LEE

Feb 5, 2014, 12:12:15 AM2/5/14
I stumbled upon a repo but have not tried it:

Darryl Porter

Feb 5, 2014, 8:17:19 AM2/5/14

Thanks, I'll take a look

You received this message because you are subscribed to a topic in the Google Groups "Locomotive" group.
To unsubscribe from this topic, visit
To unsubscribe from this group and all its topics, send an email to
Reply all
Reply to author
0 new messages