// 和环境有关的配置
module.exports = {
  // controller中请求各类数据前缀和域名的键值对
  api: {
    merchantBackend_api: 'http://merchantapi.xyqb.com',
    redpacket_api: 'http://redpacket.xyqb.com',
    app_api: 'https://sappbackend.xyqb.com',
    btCapital_api: 'http://fundmanage.xyqb.com',
    boHai_api: 'http://fundmanage.xyqb.com',
    btDirect_api: 'http://internal.btzt.xyqb.com',
    sms_api: 'http://backend.xyqb.com',
    userCenter_api: 'https://passportapi2.xyqb.com',
    zbj_api: 'http://taurus.quantgroup.cn/',
    gdxd_api: 'http://192.168.4.161:7005'
  },

  // 站点相关的配置
  site: {
    env: 'development',
    port: 80
  },

  userCenter: 'http://op.xyqb.com',

  // mongo配置
  mongo: {
    options: {
     options: {
      auto_reconnect: true,
      poolSize: 3,
      socketOptions: {
        keepAlive: 300000,
        connectTimeoutMS: 30000
      }
    }, 
    },
    api: {
      'implied': 'mongodb://192.168.4.50:27017/op',
      'xyqb': 'mongodb://192.168.4.50:27017/h5_xyqb',
      'loan': 'mongodb://192.168.4.50:27017/loan',
      'ka_factory': 'mongodb://192.168.4.50:27017/ka_factory'
    }  
  },
  
  // redis配置
  redis: {
    api: 'redis://192.168.4.50:6379/1'
  },

  // 七牛配置
  qiniu: {
    domain: 'http://op-api.xyqb.com',
    ACCESS_KEY: 'QyjX3i2tEMvrv50j6M_wpb9YoFJbxSm3jEkOj9lY',
    SECRET_KEY: 'uoMTzRLoElTAKXVzelGgTvI652zJ8bCz_qqTtoGl',
    BUCKET: 'app-sync',
  },

  upload: {
    path: '/vpants/quant_group/op-api-data'
  },

  log4js: {
    "appenders": [
      {
        "type": "dateFile",
        "filename": "/home/quant_group/logs/op-api.log",
        "pattern": "-yyyy-MM-dd",
        "layout": { type: 'basic' }
      },
      {
        "type": "logLevelFilter",
        "level": "ERROR",
        "appender": {
          "type": "dateFile",
          "filename": "/home/quant_group/logs/op-api-errors.log",
          "pattern": "-yyyy-MM-dd"
        }
      }
    ]
  },
  upload: {
    path:  '/home/quant_group/op-api/upload'
  }
}