btford / angular-express-seed

A great starting point for writing AngularJS apps backed by an Express-powered node.js server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using this with socket.io

teltploek opened this issue · comments

Hi,

I was trying to hook this up with socket.io, but I'm not sure how to do it.

As far I as can read from Express - Migrating from 2.x to 3.x it instucts me to do it like this:

var app = express() , http = require('http') , server = http.createServer(app) , io = require('socket.io').listen(server); server.listen(3000);

But angular-express-seed somehow merges the app and server variable together. How would I go about extracting the server from the app-variable to be able to use socket.io with this?

Best regards
Brian