config.default.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /* eslint valid-jsdoc: "off" */
  2. 'use strict';
  3. const { jwt } = require('./config.secret');
  4. /**
  5. * @param {Egg.EggAppInfo} appInfo app info
  6. */
  7. module.exports = (appInfo) => {
  8. /**
  9. * built-in config
  10. * @type {Egg.EggAppConfig}
  11. **/
  12. const config = (exports = {});
  13. // use for cookie sign key, should change to your own and keep security
  14. config.keys = appInfo.name + '_1611133759961_4798';
  15. // add your middleware config here
  16. config.middleware = [];
  17. // add your user config here
  18. const userConfig = {
  19. // myAppName: 'egg',
  20. };
  21. config.cluster = {
  22. listen: {
  23. port: 9101,
  24. },
  25. };
  26. config.jwt = {
  27. ...jwt,
  28. expiresIn: '1d',
  29. issuer: 'test',
  30. };
  31. config.dbName = 'new-platform';
  32. config.mongoose = {
  33. url: `mongodb://localhost:27017/${config.dbName}`, //106.12.161.200
  34. options: {
  35. user: 'admin',
  36. pass: 'admin',
  37. authSource: 'admin',
  38. useNewUrlParser: true,
  39. useCreateIndex: true,
  40. },
  41. };
  42. config.amqp = {
  43. client: {
  44. hostname: '127.0.0.1',
  45. username: 'visit',
  46. password: 'visit',
  47. vhost: 'platform',
  48. },
  49. app: true,
  50. agent: true,
  51. };
  52. config.redis = {
  53. client: {
  54. port: 6379, // Redis port
  55. host: '127.0.0.1', // Redis host
  56. password: '123456',
  57. db: 1,
  58. },
  59. };
  60. config.session = {
  61. maxAge: 1000 * 60 * 30, // 30=>30min
  62. renew: true,
  63. };
  64. config.export = {
  65. root_path: 'D:\\temp',
  66. export_path: 'D:\\temp\\export',
  67. export_dir: 'export',
  68. patentInfo_dir: 'patentInfo',
  69. domain: 'http://broadcast.waityou24.cn',
  70. };
  71. config.import = {
  72. root_path: 'D:\\temp',
  73. // root_path: 'D:\\free\\workspace\\server\\service-file\\upload',
  74. };
  75. config.project = {
  76. mission: 'http://127.0.0.1:4001',
  77. hnhmain: 'http://127.0.0.1:9201',
  78. };
  79. // 服务器发布路径
  80. config.baseUrl = 'http://broadcast.waityou24.cn';
  81. config.wxapi = {
  82. baseUrl: 'http://wx.cc-lotus.info', // 微信网关地址
  83. patent: {
  84. appid: 'wx42e8aeda4a381fa6',
  85. appSecret: 'd5f8bf2a4a37bd86f45fbff3c7d9fd3c',
  86. },
  87. kjzl: {
  88. appid: 'wxcf1b5457939b0932',
  89. appSecret: 'f9a947c4a11f5304fc0bcabef98093d8',
  90. },
  91. jlstcompany: {
  92. appid: 'wx696d9dc3f5c25e42',
  93. appSecret: 'b794494632f448f56a6e722f57b42bc9',
  94. },
  95. jlstcoupons: {
  96. appid: 'wxc98fa7131638a37c',
  97. appSecret: 'f55f1734ee919a8e4eac64aea67f350a',
  98. },
  99. free: {
  100. appid: 'wxdf3ed83c095be97a',
  101. appSecret: 'd85dbe075c090cb12ce416bbda8e698c',
  102. },
  103. };
  104. return {
  105. ...config,
  106. ...userConfig,
  107. };
  108. };