Showing
1 changed file
with
6 additions
and
1 deletions
... | @@ -6,7 +6,9 @@ var logger = require('morgan'); | ... | @@ -6,7 +6,9 @@ var logger = require('morgan'); |
6 | var indexRouter = require('./routes/index'); | 6 | var indexRouter = require('./routes/index'); |
7 | var usersRouter = require('./routes/users'); | 7 | var usersRouter = require('./routes/users'); |
8 | 8 | ||
9 | -var app = express(); | 9 | +var app = express(), |
10 | +server= require('http').createServer(app), | ||
11 | +SOCKETIO=require('./lib/socketio.js'); | ||
10 | 12 | ||
11 | // view engine setup | 13 | // view engine setup |
12 | app.set('views', path.join(__dirname, 'views')); | 14 | app.set('views', path.join(__dirname, 'views')); |
... | @@ -37,4 +39,7 @@ app.use(function(err, req, res, next) { | ... | @@ -37,4 +39,7 @@ app.use(function(err, req, res, next) { |
37 | res.render('error'); | 39 | res.render('error'); |
38 | }); | 40 | }); |
39 | 41 | ||
42 | +server.listen(80); | ||
43 | +SOCKETIO(server,app); | ||
44 | + | ||
40 | module.exports = app; | 45 | module.exports = app; | ... | ... |
-
Please register or login to post a comment