config.local.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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: '192.168.1.76',
  16. // 端口号
  17. port: '3306',
  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: '192.168.1.76',
  37. port: '6379',
  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.middleware = ['httpHeader', 'gzip', 'urlParse', 'sortFilter', 'autoLogger', 'autoFinishLogger'];
  50. // 前端验证
  51. config.jsValidator = {
  52. client: {},
  53. app: true,
  54. };
  55. // 上传设置
  56. config.multipart = {
  57. whitelist: ['.json', '.txt',
  58. '.xls', '.xlsx',
  59. '.doc', '.docx',
  60. '.pdf',
  61. '.ppt', '.pptx',
  62. '.png', '.jpg', '.jpeg', '.gif', '.bmp', '.cad', '.dwg',
  63. '.zip', '.rar', '.7z', ''],
  64. fileSize: '100mb',
  65. fields: '15',
  66. };
  67. // session配置
  68. config.session = {
  69. key: 'ZHC_SESS',
  70. maxAge: 7 * 24 * 3600 * 1000, // 7天
  71. httpOnly: true,
  72. encrypt: true,
  73. //renew: true, // session临近过期更新过期时间
  74. rolling: true, // 每次都更新session有效期
  75. };
  76. // 是否压缩替换前端js
  77. config.min = false;
  78. config.logger = {
  79. consoleLevel: 'WARN',
  80. disableConsoleAfterReady: false,
  81. };
  82. // wx扫码登录
  83. config.wxCode = {
  84. appid: 'wx3d5394b238a3bc9a',
  85. appsecret: '457d64c55f48f57cd22eca47e53d15cb',
  86. };
  87. config.hisOssPath = 'qa/';
  88. config.stashOssPath = 'stash/qa/';
  89. config.oss = {
  90. clients: {
  91. signPdf: {
  92. bucket: 'measure-sign-pdf',
  93. },
  94. fujian: {
  95. bucket: 'jiliang-qa',
  96. },
  97. his: {
  98. bucket: 'jiliang-his',
  99. }
  100. },
  101. default: {
  102. accessKeyId: 'LTAIALMjBHOs9PLA',
  103. accessKeySecret: 'HSnULQs87wAJhcziAdyRv3GZ4EYctc',
  104. endpoint: 'oss-cn-shenzhen.aliyuncs.com',
  105. timeout: '60s',
  106. },
  107. };
  108. config.fujianOssPath = 'https://jiliang-qa-oss-cdn.smartcost.com.cn/qa/';
  109. config.fujianOssFolder = 'qa/';
  110. // 自带接口系统地址
  111. config.syncUrl = 'http://127.0.0.1:7169/';
  112. config.is_debug = true;
  113. // 项目管理跳转路径
  114. config.managementPath = 'http://localhost:3000';
  115. config.managementProxyPath = 'http://192.168.1.76:2020';
  116. config.url3f = 'http://127.0.0.1:7005/3f';
  117. config.table_depart = {
  118. heavy: 100,
  119. light: 10,
  120. };
  121. return config;
  122. };