aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorHumairAK <humair88@hotmail.com>2016-07-24 04:09:20 +0000
committerHumairAK <humair88@hotmail.com>2016-07-24 04:09:20 +0000
commit2a3f37903f693cd5af13dbf8dd7df3d0f4e19ee0 (patch)
tree6d88260f53dd867d34238cf07a2710d99c62dfd0 /bin
parent807eb06e57ba4454bdba32493ae603ef9c2c45a1 (diff)
parent59cf16ee546111c186e36dc723a60de49cf25001 (diff)
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');