var app = require('express')();
var server = require('http').createServer(app);
var webRTC = require('webrtc.io').listen(server);
var request = http.get("http://stats.zello.com/channels-suggest/ru/"
var port = process.env.PORT || 8080;
server.listen(port);



app.get('/', function(req, res) {
  res.sendfile(__dirname + '/index.html');
  res.send(request);
});

app.get('/style.css', function(req, res) {
  res.sendfile(__dirname + '/style.css');
});

app.get('/fullscrean.png', function(req, res) {
  res.sendfile(__dirname + '/fullscrean.png');
});

app.get('/script.js', function(req, res) {
  res.sendfile(__dirname + '/script.js');
});

app.get('/webrtc.io.js', function(req, res) {
  res.sendfile(__dirname + '/webrtc.io.js');
});

webRTC.rtc.on('chat_msg', function(data, socket) {
  var roomList = webRTC.rtc.rooms[data.room] || [];

  for (var i = 0; i < roomList.length; i++) {
    var socketId = roomList[i];

    if (socketId !== socket.id) {
      var soc = webRTC.rtc.getSocket(socketId);

      if (soc) {
        soc.send(JSON.stringify({
          "eventName": "receive_chat_msg",
          "data": {
            "messages": data.messages,
            "color": data.color
          }
        }), function(error) {
          if (error) {
            console.log(error);
          }
        });
      }
    }
  }
});

@@ -1,262 +1,58 @@
 var 
-app = require('express')();%0Avar server = require('http').createServer(app);%0Avar webRTC = require('webrtc.io').listen(server);%0Avar request = http.get(%22http://stats.zello.com/channels-suggest/ru/%22%0Avar port = process.env.PORT %7C%7C 8080;%0Aserver.listen(port);%0A%0A
+express = require('express');%0Avar app = express();
 %0A%0Aap
@@ -72,33 +72,32 @@
 nction(req, res)
- 
 %7B%0A  res.sendfile
@@ -96,1033 +96,44 @@
 send
-file(__dirname + '/index.html');%0A  res.send(request);%0A%7D);%0A%0Aapp.get('/style.css', function(req, res) %7B%0A  res.sendfile(__dirname + '/style.css');%0A%7D);%0A%0Aapp.get('/fullscrean.png', function(req, res) %7B%0A  res.sendfile(__dirname + '/fullscrean.png');%0A%7D);%0A%0Aapp.get('/script.js', function(req, res) %7B%0A  res.sendfile(__dirname + '/script.js');%0A%7D);%0A%0Aapp.get('/webrtc.io.js', function(req, res) %7B%0A  res.sendfile(__dirname + '/webrtc.io.js');%0A%7D);%0A%0AwebRTC.rtc.on('chat_msg', function(data, socket) %7B%0A  var roomList = webRTC.rtc.rooms%5Bdata.room%5D %7C%7C %5B%5D;%0A%0A  for (var i = 0; i %3C roomList.length; i++) %7B%0A    var socketId = roomList%5Bi%5D;%0A%0A    if (socketId !== socket.id) %7B%0A      var soc = webRTC.rtc.getSocket(socketId);%0A%0A      if (soc) %7B%0A        soc.send(JSON.stringify(%7B%0A          %22eventName%22: %22receive_chat_msg%22,%0A          %22data%22: %7B%0A            %22messages%22: data.messages,%0A            %22color%22: data.color%0A          %7D%0A        %7D), function(error) %7B%0A          if (error) %7B%0A            console.log(error);%0A          %7D%0A        %7D);%0A      %7D%0A    %7D%0A  %7D%0A%7D
+('hello world');%0A%7D);%0A%0Aapp.listen(3000
 );%0A

Update server.js