var app = require('express')();
var server = require('http').createServer(app);

var port = process.env.PORT || 80;
server.listen(port);
var obj={};
var unirest = require('unirest');

unirest.get("http://stats.zello.com/channels-suggest/ru")
  .send()
  .end(response=> {
    if (response.ok) {
      
	  obj = JSON.parse(response.raw_body);
	  return obj;
    } else {
      console.log("Got an error: ", response.error)
    }
  })
  app.get('/', function (req, res) {
  res.send(obj[0]);
});

var app = require('express')();
var server = require('http').createServer(app);

var port = process.env.PORT || 80;
server.listen(port);
var obj={};
var unirest = require('unirest');


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






unirest.get("http://stats.zello.com/channels-suggest/ru")
  .send()
  .end(response=> {
    if (response.ok) {
      
	  obj = JSON.parse(response.raw_body);
	  return obj;
    } else {
      console.log("Got an error: ", response.error)
    }
  })
  app.get('/', function (req, res) {
  res.send(obj[0]);
});

Update server.js