var express = require('express');
var ip = require("ip");
var app = express();

app.get('/', function (req, res) {
  var r = Math.floor(Math.random() * 10) + 1;
  res.send({res: fuct(100 + r), ip: ip.address(), time: new Date()});
});

var server = app.listen(3000, function () {

  var host = server.address().address;
  var port = server.address().port;

  console.log('Example app listening at http://%s:%s', host, port);

});

var fuct = function(num) {
  var f = 1;
  for (var c = 1; c < = n; ++c) f *= c;
  return f;
};