Skip to content

Instantly share code, notes, and snippets.

@cianclarke
Created June 11, 2015 08:16
Show Gist options
  • Save cianclarke/a24a8c299c5a41324f2d to your computer and use it in GitHub Desktop.
Save cianclarke/a24a8c299c5a41324f2d to your computer and use it in GitHub Desktop.
var server = app.listen(port, host, function() {
console.log("App started at: " + new Date() + " on port: " + port);
});
submissions.stream(server);
// submissions.js:
exports.stream = function(server){
var io = require('socket.io')(server);
io.on('connection', function (socket) {
socket.emit('submission', parsed);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment