Skip to content

Instantly share code, notes, and snippets.

View iDVB's full-sized avatar
💭
Work'n

Dan Van Brunt iDVB

💭
Work'n
View GitHub Profile
@iDVB
iDVB / index.js
Created February 11, 2014 04:12
Rendr + Socket.io base Express file
var express = require('express')
, http = require('http')
, rendr = require('rendr')
, config = require('config')
, lampAPI = require('./api/index')
, io = require('socket.io')
, ioServer
, webSocket
, connectedUsers = {}
, app = express();
@iDVB
iDVB / app_view.js
Created February 11, 2014 04:03
Rendr + Socket.io app_view.js
var BaseAppView = require('rendr/client/app_view')
, $ = require('jquery')
, io = require('socket.io')
;
module.exports = BaseAppView.extend({
postInitialize: function() {
var socket = io.connect('http://localhost');
socket.on('news', function (data) {