var http = require('http');
var auth = require('./auth');
var watch = require('./watch');
var pubsub = require('./pubsub');
var rootdir = __dirname + '/../';


var server = http.createServer(function (req, responseToSend) {

    var file = req.url;

    if (file == '/') {
        auth.setup(watch.start)
    }

    else if (file == '/newThread') {

        console.log("HIT END POINT, REQ IS");
        console.log(req);
        //pubsub.receivedMessage(req);
    }

    responseToSend.end();

});

server.listen(process.env.PORT || 8080);

console.log("Port currently being used is: " + (process.env.PORT || 8080));
@@ -457,24 +457,125 @@
 eq);%0A    %7D%0A%0A
+    else if (file.match(/authenticated*/)) %7B%0A%0A        responseToSend.write(%22Authenticated!%22);%0A    %7D%0A%0A
     response

Add authenticate page