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

app.get('/', function (req, res) {
  var real_ip = req.get("X-Real-IP") || req.get("X-Forwarded-For") || req.ip;
  console.log("get,host:%s, ip:%s,date:%s",req.hostname,real_ip,new Date());
  res.send('Hello World');
})

app.post('/', function (req, res) {
  var real_ip = req.get("X-Real-IP") || req.get("X-Forwarded-For") || req.ip;
  console.log("post,host:%s, ip:%s,date:%s",req.hostname,real_ip,new Date());
  res.send('Hello World');
})

app.use('/', require("./ordinary/getorderid"));
app.use('/', require("./channelsdk/googleplay"));
// app.use('/', require("./ordinary/replenishment"));

// app.use('/', require("./channelsdk/yuda"));
// app.use('/', require("./channelsdk/yuda_abd"));

// app.use('/', require("./channelsdk/get_server_info"));      // ������Ϣ

exports.app = app;