Skip to content

Instantly share code, notes, and snippets.

@hayes
hayes / compound-socket.js
Last active December 10, 2015 18:18
a quick way to get access to compound routing/controllers through socket.io
var sio = require('socket.io');
var fn = function () {};
var http = require('http');
module.exports = function (compound) {
var app = compound.app;
var server = http.createServer(app);
compound.server = server;
var io = compound.io = sio.listen(server);