unknown

socket io settings to main app

Showing 1 changed file with 6 additions and 1 deletions
......@@ -6,7 +6,9 @@ var logger = require('morgan');
var indexRouter = require('./routes/index');
var usersRouter = require('./routes/users');
var app = express();
var app = express(),
server= require('http').createServer(app),
SOCKETIO=require('./lib/socketio.js');
// view engine setup
app.set('views', path.join(__dirname, 'views'));
......@@ -37,4 +39,7 @@ app.use(function(err, req, res, next) {
res.render('error');
});
server.listen(80);
SOCKETIO(server,app);
module.exports = app;
......