aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorkumar <kumar.damani@mail.utoronto.ca>2016-07-24 03:33:02 +0000
committerkumar <kumar.damani@mail.utoronto.ca>2016-07-24 03:33:02 +0000
commit59cf16ee546111c186e36dc723a60de49cf25001 (patch)
tree7f65205035f5a4d4e6fe47c701097ebc6b2abe01 /bin
parentcbcf2f83d7a11895deeb1234504dd767d8826d4d (diff)
parent43f7514bb2ae00d3805f1468f89bbdab6fc595fa (diff)
pull
Merge branch 'master' of https://github.com/HumairAK/solutions_repo
Diffstat (limited to 'bin')
-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');