config.remoteqa.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. 'use strict';
  2. /**
  3. * 开发环境相关配置
  4. *
  5. * @author CaiAoLin
  6. * @date 2017/8/29
  7. * @version
  8. */
  9. module.exports = appInfo => {
  10. const config = {};
  11. // 数据库配置
  12. config.mysql = {
  13. client: {
  14. // host
  15. host: 'smartcost.in.8866.org',
  16. // 端口号
  17. port: '26905',
  18. // 用户名
  19. user: 'zh_dev',
  20. // 密码
  21. password: 'zongheng2019',
  22. // 数据库名
  23. database: 'calculation',
  24. // database: 'calc_copy_pro',
  25. },
  26. // 是否加载到 app 上,默认开启
  27. app: true,
  28. // 是否加载到 agent 上,默认关闭
  29. agent: false,
  30. };
  31. // 表名前缀
  32. config.tablePrefix = 'zh_';
  33. // redis设置
  34. config.redis = {
  35. client: {
  36. host: 'smartcost.in.8866.org',
  37. port: '26906',
  38. password: 'zongheng2019',
  39. db: '0',
  40. },
  41. agent: true,
  42. };
  43. // geetest验证码key
  44. config.geetest = {
  45. id: '23c50f6711966f744c93a70167c8e0a4',
  46. key: '9b67989994f9def437ea68bb495f0162',
  47. };
  48. // 前端验证
  49. config.jsValidator = {
  50. client: {},
  51. app: true,
  52. };
  53. // 上传设置
  54. config.multipart = {
  55. whitelist: ['.json', '.txt',
  56. '.xls', '.xlsx',
  57. '.doc', '.docx',
  58. '.pdf',
  59. '.png', '.jpg', '.jpeg', '.gif', '.bmp',
  60. '.zip', '.rar', '.7z'],
  61. fileSize: '30mb',
  62. };
  63. // session配置
  64. config.session = {
  65. key: 'ZHC_SESS',
  66. maxAge: 7 * 24 * 3600 * 1000, // 7天
  67. httpOnly: true,
  68. encrypt: true,
  69. //renew: true, // session临近过期更新过期时间
  70. rolling: true, // 每次都更新session有效期
  71. };
  72. // 是否压缩替换前端js
  73. config.min = false;
  74. config.logger = {
  75. consoleLevel: 'WARN',
  76. disableConsoleAfterReady: false,
  77. };
  78. config.oss = {
  79. clients: {
  80. signPdf: {
  81. bucket: 'measure-sign-pdf',
  82. },
  83. fujian: {
  84. bucket: 'jiliang-qa',
  85. },
  86. },
  87. default: {
  88. accessKeyId: 'LTAIALMjBHOs9PLA',
  89. accessKeySecret: 'HSnULQs87wAJhcziAdyRv3GZ4EYctc',
  90. endpoint: 'oss-cn-shenzhen.aliyuncs.com',
  91. timeout: '60s',
  92. },
  93. };
  94. config.fujianOssPath = 'https://jiliang-qa-oss.smartcost.com.cn/qa/';
  95. config.fujianOssFolder = 'qa/';
  96. config.is_debug = true;
  97. return config;
  98. };