config.local.js 3.0 KB

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