config.prod.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. "use strict";
  2. let imDbConfig = {
  3. host: '59.61.92.94',
  4. user: 'im',
  5. password: 'im!)123',
  6. database: 'im',
  7. connectionLimit: '100',
  8. charset : 'utf8mb4'
  9. };
  10. // Redis
  11. let redisConfig = {
  12. host: '120.41.253.95',
  13. port: 6380,
  14. db: 1,
  15. password:'jkzl_ehr'
  16. };
  17. // 三师后台
  18. let wlyyServerConfig = {
  19. host: '120.41.252.108',
  20. port: 9660,
  21. model:"/wlyy"
  22. };
  23. // 个推AppStore版参数
  24. let getTuiConfig = {
  25. HOST: 'https://api.getui.com/apiex.htm',
  26. APPID: 'qWmRh2X88l7HuE36z3qBe8',
  27. APPKEY: 'EzERfV8c849lBkZqHWzQG1',
  28. MASTERSECRET: 'veXiajQrId6iojy7Qv8kZ2'
  29. };
  30. // 微信配置
  31. let wechatConfig = {
  32. appId: 'wxad04e9c4c5255acf',
  33. appSecret: 'ae77c48ccf1af5d07069f5153d1ac8d3',
  34. token: '27eb3bb24f149a7760cf1bb154b08040',
  35. baseUrl: 'www.xmtyw.cn/wlyy',
  36. template: {
  37. consultTemplate: '0mF_vHj-ILx8EH8DwzmAi7LqzjqYiU9IrSRRmziTZyc' // 咨询回复模板
  38. }
  39. };
  40. // 会话配置
  41. let sessionConfig = {
  42. maxMessageCount: 1000, // 会话缓存的消息数量
  43. maxMessageTimespan: 7 * 24 * 3600, // 会话缓存的最大时间跨度
  44. expireTime: 3 * 60 * 60 * 1000, // 会话过期时间,以毫秒计
  45. expireSessionCleanCount: 10 // 每次清理多少个过期会话
  46. };
  47. // 议题配置
  48. let topicConfig = {
  49. TTL: 24, // 议题的存活时间,TTL = Time To Live
  50. TERMINATING_CRON: "* 59 * * * *" // 议题自动关闭的任务执行时间间隔
  51. };
  52. exports.environment = 'prod';
  53. exports.pubChannel = 'phone_to_pc';
  54. exports.subChannel = 'pc_to_phone';
  55. exports.pubSubSwitch = true;
  56. exports.app = 'im.server';
  57. exports.version = '2.0.0';
  58. exports.debug = true;
  59. exports.serverPort = 3000;
  60. exports.sessionExpire = 1800;
  61. exports.showSQL = false;
  62. exports.imDbConfig = imDbConfig;
  63. exports.redisConfig = redisConfig;
  64. exports.getTuiConfig = getTuiConfig;
  65. exports.wlyyServerConfig = wlyyServerConfig;
  66. exports.wechatConfig = wechatConfig;
  67. exports.sessionConfig = sessionConfig;
  68. exports.topicConfig = topicConfig;