config.test.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. "use strict";
  2. let imDbConfig = {
  3. host: '172.19.103.77',
  4. user: 'root',
  5. password: '123456',
  6. database: 'im_sr',
  7. connectionLimit: '50',
  8. charset: 'utf8mb4'
  9. };
  10. // Redis
  11. let redisConfig = {
  12. host: '172.19.103.88',
  13. port: 6379,
  14. db: 2
  15. };
  16. // let redisConfig = {
  17. // host: '192.168.1.220',
  18. // port: 6379,
  19. // db: 1
  20. // };
  21. // 内网Redis
  22. let innerRedisConfig = {
  23. host: '172.19.103.88',
  24. port: 6379,
  25. db: 2
  26. };
  27. // 三师后台
  28. let wlyyServerConfig = {
  29. host: '172.19.103.72',
  30. port: 9096,
  31. model:"/wlyy"
  32. };
  33. // 个推AppStore版参数
  34. let getTuiConfig = {
  35. HOST: 'https://api.getui.com/apiex.htm',
  36. APPID: 'NamoCLe9no9pIihdoZ930A',
  37. APPKEY: 'db7PZsd7TX6JAsLKmWuAT8',
  38. MASTERSECRET: '5IFJjgxRiI7QpuArMMT3E5'
  39. };
  40. // 微信配置
  41. let wechatConfig = {
  42. appId: 'wxe627ffaee2d05a40',
  43. appSecret: '7c29f6b28be7e54b742883a47ff39767',
  44. token: '27eb3bb24f149a7760cf1bb154b08040',
  45. accId: 'gh_733f975e0bed',
  46. baseUrl: 'srijk.yihu.com/wlyy',
  47. template: {
  48. consultTemplate: '-dr4QNyFoRvVsf8uWxXMC1dRyjwnbUuJwJ21vBLhf18' // 咨询回复模板
  49. }
  50. };
  51. // 会话配置
  52. let sessionConfig = {
  53. maxMessageCount: 1000, // 会话缓存的消息数量
  54. maxMessageTimespan: 7 * 24 * 3600, // 会话缓存的最大时间跨度
  55. expireSessionCleanCount: 10 // 每次清理多少个过期会话
  56. };
  57. // 议题配置
  58. let topicConfig = {
  59. TTL: 24, // 议题的存活时间,TTL = Time To Live
  60. TERMINATING_CRON: "* 30 * * * *" // 议题自动关闭的任务执行时间间隔
  61. };
  62. exports.environment = 'test';
  63. exports.pubChannel = 'test';
  64. exports.subChannel = 'dev';
  65. exports.pubSubSwitch = false;
  66. exports.app = 'im.server';
  67. exports.version = '2.0.0';
  68. exports.debug = true;
  69. exports.serverPort = 3000;
  70. exports.sessionExpire = 1800;
  71. exports.showSQL = false;
  72. exports.imDbConfig = imDbConfig;
  73. exports.redisConfig = redisConfig;
  74. exports.innerRedisConfig = innerRedisConfig;
  75. exports.getTuiConfig = getTuiConfig;
  76. exports.wlyyServerConfig = wlyyServerConfig;
  77. exports.wechatConfig = wechatConfig;
  78. exports.sessionConfig = sessionConfig;
  79. exports.topicConfig = topicConfig;