config.qa.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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: '127.0.0.1',
  16. // 端口号
  17. port: '3306',
  18. // 用户名
  19. user: 'zh_calc',
  20. // 密码
  21. password: 'calc2019',
  22. // 数据库名
  23. database: 'calculation',
  24. },
  25. // 是否加载到 app 上,默认开启
  26. app: true,
  27. // 是否加载到 agent 上,默认关闭
  28. agent: false,
  29. };
  30. // 表名前缀
  31. config.tablePrefix = 'zh_';
  32. // 中间件
  33. config.middleware = ['gzip', 'urlParse', 'sortFilter', 'autoLogger', 'autoFinishLogger'];
  34. // redis设置
  35. config.redis = {
  36. client: {
  37. host: '127.0.0.1',
  38. port: '6379',
  39. password: 'zongheng2019',
  40. db: '0',
  41. },
  42. agent: true,
  43. version: '1.0.0',
  44. };
  45. // session配置
  46. config.session = {
  47. key: 'ZHC_SESS',
  48. maxAge: 7 * 24 * 3600 * 1000, // 7天
  49. httpOnly: true,
  50. encrypt: true,
  51. //renew: true, // session临近过期更新过期时间
  52. rolling: true, // 每次都更新session有效期
  53. };
  54. config.hisOssPath = 'qa/';
  55. config.stashOssPath = 'stash/qa/';
  56. config.oss = {
  57. clients: {
  58. signPdf: {
  59. bucket: 'measure-sign-pdf',
  60. },
  61. fujian: {
  62. bucket: 'jiliang-qa',
  63. },
  64. his: {
  65. bucket: 'jiliang-his',
  66. }
  67. },
  68. default: {
  69. accessKeyId: 'LTAIALMjBHOs9PLA',
  70. accessKeySecret: 'HSnULQs87wAJhcziAdyRv3GZ4EYctc',
  71. endpoint: 'oss-cn-shenzhen.aliyuncs.com',
  72. timeout: '60s',
  73. },
  74. };
  75. config.fujianOssPath = 'https://jiliang-qa-oss-cdn.smartcost.com.cn/qa/';
  76. config.fujianOssFolder = 'qa/';
  77. // 自带接口系统地址
  78. config.syncUrl = 'http://jlqa.smartcost.com.cn:7169/';
  79. config.is_debug = true;
  80. // 项目管理跳转路径
  81. config.managementPath = 'http://pmqa.smartcost.com.cn';
  82. config.managementProxyPath = 'http://192.168.1.76:2020';
  83. config.url3f = 'http://jlqa.smartcost.com.cn:7005/3f';
  84. config.table_depart = {
  85. heavy: 100,
  86. light: 10,
  87. };
  88. return config;
  89. };