config.default.js 1017 Bytes
'use strict';

module.exports = appInfo => {
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1523942873522_3307';

  // add your config here
  config.middleware = [];

  config.mysql = {
    // 单数据库信息配置
    client: {
      // host
      host: '10.10.1.49',
      // 端口号
      port: '3306',
      // 用户名
      user: 'sferp',
      // 密码
      password: 'sh_sfkj@0915',
      // 数据库名
      database: 'sferp',
    },
    // 是否加载到 app 上,默认开启
    app: true,
    // 是否加载到 agent 上,默认关闭
    agent: false,
  };

  config.security = {
    domainWhiteList: [ '10.10.1.123:8080' ],
    csrf: false,
  };

  config.cors = {
    allowMethods: 'GET,POST,PUT',
    credentials: true,
  };

  config.multipart = {
    // will append to whilelist
    fileExtensions: [
      '.doc',
      '.docx',
      '.xls',
      '.xlsx',
    ],
  };

  return config;
};