export const redis = {
  client: {
    port: 6379,
    host: "192.168.1.90",
    password: "smartcost3850888",
    db: 0,
  },
};

// cookie 的密钥
export const keys = ["163751$@GFD164371969_47@$@#&%HDFGfd46_Abc"];

export const session = {
  key: "SESS",
  prefix: "sess-",
  maxAge: 86400000,
  httpOnly: true,
  encrypt: true,
  renew: true, // 延长会话有效期
  rolling: true,
};

export const axios = {
  // baseURL: "https://api.example.com",
  //
  // headers: {
  //   "X-Requested-With": "XMLHttpRequest",
  // },
  // timeout: 2000,
  //
  // withCredentials: false,
};

export const cache = {
  store: "memory",
  options: {
    max: 100,
    ttl: 5, // 默认过期时间
  },
};

export const view = {
  defaultViewEngine: "nunjucks",
  mapping: {
    ".html": "nunjucks",
  },
};

export const mongoose = {
  clients: {
    default: {
      uri: "mongodb://192.168.1.90:60666/auditPlatform",
      options: {
        useNewUrlParser: true,
        useUnifiedTopology: true,
        user: "wisecost",
        pass: "Smartcost3850888",
      },
    },
    // db1: {
    //   uri: "mongodb://xxxx:xxx/test1",
    //   options: {
    //     useNewUrlParser: true,
    //     useUnifiedTopology: true,
    //     user: "***********",
    //     pass: "***********",
    //   },
    // },
  },
};
