config.default.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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}`,
  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: 'E:\\exportFile',
  66. domain: 'http://broadcast.waityou24.cn',
  67. };
  68. config.import = {
  69. // root_path: 'E:\\exportFile',
  70. root_path: 'D:\\free\\workspace\\server\\service-file\\upload',
  71. };
  72. config.project = {
  73. mission: 'http://127.0.0.1:4001',
  74. hnhmain: 'http://127.0.0.1:9201',
  75. };
  76. // 服务器发布路径
  77. config.baseUrl = 'http://broadcast.waityou24.cn';
  78. config.wxapi = {
  79. baseUrl: 'http://wx.cc-lotus.info', // 微信网关地址
  80. kjzl: {
  81. appid: 'wxcf1b5457939b0932',
  82. appSecret: 'f9a947c4a11f5304fc0bcabef98093d8',
  83. },
  84. jlstcompany: {
  85. appid: 'wx696d9dc3f5c25e42',
  86. appSecret: 'b794494632f448f56a6e722f57b42bc9',
  87. },
  88. jlstcoupons: {
  89. appid: 'wxc98fa7131638a37c',
  90. appSecret: 'f55f1734ee919a8e4eac64aea67f350a',
  91. },
  92. free: {
  93. appid: 'wxdf3ed83c095be97a',
  94. appSecret: 'd85dbe075c090cb12ce416bbda8e698c',
  95. },
  96. };
  97. return {
  98. ...config,
  99. ...userConfig,
  100. };
  101. };