JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
puttin' it all together
[watch-my-terminal.git] / server.js
diff --git a/server.js b/server.js
deleted file mode 100644 (file)
index 9936453..0000000
--- a/server.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var app = require('http').createServer(handler)
-  , io = require('socket.io').listen(app)
-  , fs = require('fs')
-
-app.listen(9293);
-
-function handler (req, res) {
-  fs.readFile(__dirname + '/index.html',
-  function (err, data) {
-    if (err) {
-      res.writeHead(500);
-      return res.end('Error loading index.html');
-    }
-
-    res.writeHead(200);
-    res.end(data);
-  });
-}
-
-io.sockets.on('connection', function (socket) {
-  setInterval(function() { socket.emit('news', { hello: 'world' });}, 2000);
-  socket.on('my other event', function (data) {
-    console.log(data);
-  });
-  socket.on('jason', function (data) {
-    console.log({jason_is_here: data});
-  });
-});