aboutsummaryrefslogtreecommitdiff
path: root/bin/www.js
diff options
context:
space:
mode:
authornanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-07-24 03:10:00 +0000
committernanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-07-24 03:10:00 +0000
commit64d9ccb6ae21a12d6fbd61b371397d8d5f2e783f (patch)
tree9ec795adc8b41cd9cf159d8e2e74aed0cf932e8d /bin/www.js
parent39afbefe2ea5b7a105c352049a4a4a171502e880 (diff)
need pull
Diffstat (limited to 'bin/www.js')
-rw-r--r--bin/www.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/www.js b/bin/www.js
index 63aa24d..1d252bf 100644
--- a/bin/www.js
+++ b/bin/www.js
@@ -1,11 +1,17 @@
-#!/usr/bin/env node
+
var app = require('../app');
var http = require('http');
+var server = http.createServer(app);
+
+var io = require('socket.io')(server);
+
var port = '3000';
app.set('port', port);
-var server = http.createServer(app);
+io.on('connection', function(socket){
+ console.log('a user connected');
+});
server.listen(port, function(){
console.log('listening on port 3000');