config.dev.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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: '192.168.131.104',
  20. port: 8090,
  21. model:""
  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. /*let getTuiConfig = {
  31. HOST: 'https://api.getui.com/apiex.htm',
  32. APPID: 'DKgbGvbacm74nJJzen5ilA',
  33. APPSECRET: '4kGcL7e7kU6mbSqfEGZFW7',
  34. APPKEY: 'ArZfS2qvoA7N3hawOAGVC5',
  35. MASTERSECRET: '9lpy5vEss46tVzP1RCJiC4'
  36. };*/
  37. // 微信配置
  38. let wechatConfig = {
  39. appId: 'wxd03f859efdf0873d',
  40. appSecret: '2935b54b53a957d9516c920a544f2537',
  41. token: '27eb3bb24f149a7760cf1bb154b08040',
  42. baseUrl: 'weixin.xmtyw.cn/wlyy',
  43. template: {
  44. consultTemplate: 'qSOW0DBxO3qEBm4ucG0Ial0jxsOyD7_f2TFK5e-mQEc' // 咨询回复模板
  45. }
  46. };
  47. // 会话配置
  48. let sessionConfig = {
  49. maxMessageCount: 1000, // 会话缓存的消息数量
  50. maxMessageTimespan: 7 * 24 * 3600, // 会话缓存的最大时间跨度
  51. expireTime: 3 * 60 * 60 * 1000, // 会话过期时间,以毫秒计
  52. expireSessionCleanCount: 10 // 每次清理多少个过期会话
  53. };
  54. // 议题配置
  55. let topicConfig = {
  56. TTL: 24, // 议题的存活时间,TTL = Time To Live
  57. TERMINATING_CRON: "* 30 * * * *" // 议题自动关闭的任务执行时间间隔
  58. };
  59. exports.app = 'IM.Server';
  60. exports.version = '2.0.0';
  61. exports.debug = true;
  62. exports.serverPort = 3008;
  63. exports.sessionExpire = 1800;
  64. exports.showSQL = true;
  65. exports.imDbConfig = imDbConfig;
  66. exports.redisConfig = redisConfig;
  67. exports.getTuiConfig = getTuiConfig;
  68. exports.wlyyServerConfig = wlyyServerConfig;
  69. exports.wechatConfig = wechatConfig;
  70. exports.sessionConfig = sessionConfig;
  71. exports.topicConfig = topicConfig;