config.dev.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. "use strict";
  2. // IM数据库配置
  3. let imDbConfig = {
  4. host: '172.19.103.77',
  5. user: 'root',
  6. password: '123456',
  7. database: 'ichat',
  8. connectionLimit: '50',
  9. charset: 'utf8mb4'
  10. };
  11. // Redis
  12. let redisConfig = {
  13. host: '192.168.1.220',
  14. port: 6379,
  15. db: 9
  16. };
  17. // 三师后台
  18. let wlyyServerConfig = {
  19. host: '172.19.103.87',
  20. port: 9092
  21. };
  22. // 个推AppStore版参数
  23. let getTuiConfig = {
  24. HOST: 'https://api.getui.com/apiex.htm',
  25. APPID: 'qWmRh2X88l7HuE36z3qBe8',
  26. APPKEY: 'EzERfV8c849lBkZqHWzQG1',
  27. MASTERSECRET: 'veXiajQrId6iojy7Qv8kZ2'
  28. };
  29. /*let getTuiConfig = {
  30. HOST: 'https://api.getui.com/apiex.htm',
  31. APPID: 'DKgbGvbacm74nJJzen5ilA',
  32. APPSECRET: '4kGcL7e7kU6mbSqfEGZFW7',
  33. APPKEY: 'ArZfS2qvoA7N3hawOAGVC5',
  34. MASTERSECRET: '9lpy5vEss46tVzP1RCJiC4'
  35. };*/
  36. // 微信配置
  37. let wechatConfig = {
  38. appId: 'wxd03f859efdf0873d',
  39. appSecret: '2935b54b53a957d9516c920a544f2537',
  40. token: '27eb3bb24f149a7760cf1bb154b08040',
  41. baseUrl: 'weixin.xmtyw.cn/wlyy',
  42. template: {
  43. consultTemplate: 'qSOW0DBxO3qEBm4ucG0Ial0jxsOyD7_f2TFK5e-mQEc' // 咨询回复模板
  44. }
  45. };
  46. // 会话配置
  47. let sessionConfig = {
  48. maxMessageCount: 1000, // 会话缓存的消息数量
  49. maxMessageTimespan: 7 * 24 * 3600, // 会话缓存的最大时间跨度
  50. expireTime: 3 * 60 * 60 * 1000, // 会话过期时间,以毫秒计
  51. expireSessionCleanCount: 10 // 每次清理多少个过期会话
  52. };
  53. exports.app = 'IM.Server';
  54. exports.version = '2.0.0';
  55. exports.debug = true;
  56. exports.serverPort = 3008;
  57. exports.sessionExpire = 1800;
  58. exports.showSQL = true;
  59. exports.imDbConfig = imDbConfig;
  60. exports.redisConfig = redisConfig;
  61. exports.getTuiConfig = getTuiConfig;
  62. exports.wlyyServerConfig = wlyyServerConfig;
  63. exports.wechatConfig = wechatConfig;
  64. exports.sessionConfig = sessionConfig;