config.prod.js 1.9 KB

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