config.dev.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. "use strict";
  2. // IM数据库配置
  3. let imDbConfig = {
  4. host: '172.19.103.85',
  5. user: 'linzhou',
  6. password: 'linzhou',
  7. database: 'im_new',
  8. connectionLimit: '50',
  9. charset: 'utf8mb4'
  10. };
  11. // let imDbConfig = {
  12. // host: '172.19.103.77',
  13. // user: 'root',
  14. // password: '123456',
  15. // database: 'im_new',
  16. // connectionLimit: '50',
  17. // charset: 'utf8mb4'
  18. // };
  19. // Redis
  20. let redisConfig = {
  21. host: '192.168.1.220',
  22. port: 6379,
  23. db: 1
  24. };
  25. // 三师后台
  26. // let wlyyServerConfig = {
  27. // host: '172.19.103.88',
  28. // port: 9092,
  29. // model:"/wlyy"
  30. // };
  31. let wlyyServerConfig = {
  32. host: '192.168.131.24',
  33. port: 8080,
  34. model:"/"
  35. };
  36. // 个推AppStore版参数
  37. let getTuiConfig = {
  38. HOST: 'https://api.getui.com/apiex.htm',
  39. APPID: 'qWmRh2X88l7HuE36z3qBe8',
  40. APPKEY: 'EzERfV8c849lBkZqHWzQG1',
  41. MASTERSECRET: 'veXiajQrId6iojy7Qv8kZ2'
  42. };
  43. /*let getTuiConfig = {
  44. HOST: 'https://api.getui.com/apiex.htm',
  45. APPID: 'DKgbGvbacm74nJJzen5ilA',
  46. APPSECRET: '4kGcL7e7kU6mbSqfEGZFW7',
  47. APPKEY: 'ArZfS2qvoA7N3hawOAGVC5',
  48. MASTERSECRET: '9lpy5vEss46tVzP1RCJiC4'
  49. };*/
  50. // 微信配置
  51. // let wechatConfig = {
  52. // appId: 'wxd03f859efdf0873d',
  53. // appSecret: '2935b54b53a957d9516c920a544f2537',
  54. // token: '27eb3bb24f149a7760cf1bb154b08040',
  55. // baseUrl: 'weixin.xmtyw.cn/wlyy',
  56. // template: {
  57. // consultTemplate: 'qSOW0DBxO3qEBm4ucG0Ial0jxsOyD7_f2TFK5e-mQEc' // 咨询回复模板
  58. // }
  59. // };
  60. // 微信配置
  61. let wechatConfig = {
  62. appId: 'wx1f129f7b51701428',
  63. appSecret: '988f005d8309ed1795939e0f042431fb',
  64. token: '27eb3bb24f149a7760cf1bb154b08040',
  65. baseUrl: 'ehr.yihu.com/wlyy',
  66. template: {
  67. consultTemplate: '-dr4QNyFoRvVsf8uWxXMC1dRyjwnbUuJwJ21vBLhf18' // 咨询回复模板
  68. }
  69. };
  70. // 会话配置
  71. let sessionConfig = {
  72. maxMessageCount: 1000, // 会话缓存的消息数量
  73. maxMessageTimespan: 7 * 24 * 3600, // 会话缓存的最大时间跨度
  74. expireTime: 3 * 60 * 60 * 1000, // 会话过期时间,以毫秒计
  75. expireSessionCleanCount: 10 // 每次清理多少个过期会话
  76. };
  77. // 议题配置
  78. let topicConfig = {
  79. TTL: 24, // 议题的存活时间,TTL = Time To Live
  80. TERMINATING_CRON: "* 30 * * * *" // 议题自动关闭的任务执行时间间隔
  81. };
  82. exports.environment = 'dev';
  83. exports.pubChannel = 'dev';
  84. exports.subChannel = 'dev';
  85. exports.pubSubSwitch = true;
  86. exports.app = 'IM.Server';
  87. exports.version = '2.0.0';
  88. exports.debug = true;
  89. exports.serverPort = 3000;
  90. exports.sessionExpire = 1800;
  91. exports.showSQL = true;
  92. exports.imDbConfig = imDbConfig;
  93. exports.redisConfig = redisConfig;
  94. exports.getTuiConfig = getTuiConfig;
  95. exports.wlyyServerConfig = wlyyServerConfig;
  96. exports.wechatConfig = wechatConfig;
  97. exports.sessionConfig = sessionConfig;
  98. exports.topicConfig = topicConfig;