
const path = require('path')
const logDir = path.resolve(process.cwd(), './logs')

module.exports = {
  port:80,
  api: {

    passport_api: 'http://xyqb-user',
    xjd_api: 'http://xyqb',
    redpacket_api: 'http://redpacket',
    score_api: 'http://score',
    auth_api: 'https://han-gu-guan',
    flow_api: 'http://traffic-webapp',
    mall_api: 'http://xyqb-mall',
    bt_api: 'http://baitiao',
    appbackend_api: 'http://app-backend',
    pay_api: 'http://gu-bei'
  },

  redis: {
    api: 'redis://redis:6379/1'
  },

  log4js: {
    appenders: {
      out: { type: 'stdout' },
      app: { type: 'dateFile', filename: logDir + '/xyqb-h5-backend.log', daysToKeep: 3, compress: true },
      error: { type: 'dateFile', filename: logDir + '/xyqb-h5-backend.error.log', daysToKeep: 3, compress: true },
      just_errors: { type: 'logLevelFilter', appender: 'error', level: 'error' }
    },
    categories: {
      default: { appenders: ['out', 'app', 'just_errors'], level: 'info' }
    }
  },

  qiniu: {
    domain: 'https://mapi.xyqb.com',
    ACCESS_KEY: 'e2S74rOnpqNz1rkZRdgY45c8L988PoARRQ60_6-t',
    SECRET_KEY: 'YYtAEZ2bPDiyNLt2qLKGpaEp0-Thq8tGLrqlBgxY',
    BUCKET: 'app-sync',
  },

  mongo: {
    api: 'mongodb://192.168.4.50:27017/h5_xyqb'
  },

  ocr: {
    auth_api: 'http://139.198.2.95:38099/auth-center/api/ocr/h5/auth_url.json',
    query_api: 'http://139.198.2.95:38099/auth-center/h5/api/ocr/auth.json',
    key: 'wd8bRaLf1nbiMDvPpM1fP9sA2mVSmmpy'
  },

  rabbitmq: {
    mall_api: 'amqp://qa:qatest@rabbitmq:5672/mall'
  }
}
