aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
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');