router.js 954 B

123456789101112131415161718192021222324252627
  1. var express = require('express');
  2. var app = express();
  3. app.get('/', function (req, res) {
  4. var real_ip = req.get("X-Real-IP") || req.get("X-Forwarded-For") || req.ip;
  5. console.log("get,host:%s, ip:%s,date:%s",req.hostname,real_ip,new Date());
  6. res.send('Hello World');
  7. })
  8. app.post('/', function (req, res) {
  9. var real_ip = req.get("X-Real-IP") || req.get("X-Forwarded-For") || req.ip;
  10. console.log("post,host:%s, ip:%s,date:%s",req.hostname,real_ip,new Date());
  11. res.send('Hello World');
  12. })
  13. app.use('/', require("./ordinary/getorderid"));
  14. app.use('/', require("./channelsdk/googleplay"));
  15. app.use('/', require("./query/rechargeinfo"));
  16. app.use('/', require("./channelsdk/shengtian"));
  17. // app.use('/', require("./ordinary/replenishment"));
  18. // app.use('/', require("./channelsdk/yuda"));
  19. // app.use('/', require("./channelsdk/yuda_abd"));
  20. // app.use('/', require("./channelsdk/get_server_info")); // ������Ϣ
  21. exports.app = app;