text: var express        =        require("express");
  var bodyParser     =        require("body-parser");
  var app            =        express();
  
  app.use(bodyParser.urlencoded({ extended: false }));
  app.use(bodyParser.json());
  
  var morgan = require('morgan');
  app.use(morgan('dev'));
  
  var http = require('http').Server(app);
  var io = require('socket.io')(http);
  
  app.get('/', function(req, res){
    res.sendFile(__dirname + '/index.html');
  });
  
  app.post('/logmessage',function(request,response){
   io.emit('log message', request.body.data);
   response.send();
  });
  
  http.listen(3000, function(){
    console.log('listening on *:3000');
  });
  