config.default.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 + '_1571378739964_3623';
  15. // add your middleware config here
  16. config.middleware = [];
  17. // add your user config here
  18. const userConfig = {
  19. // myAppName: 'egg',
  20. };
  21. config.errorMongo = {
  22. details: true,
  23. };
  24. config.errorHanler = {
  25. details: true,
  26. };
  27. // add your config here
  28. config.cluster = {
  29. listen: {
  30. port: 8106,
  31. },
  32. };
  33. config.multipart = {
  34. fileSize: '50mb', // 文件大小
  35. mode: 'file', // 文件模式
  36. whitelist: [ '.xlsx' ], // 文件类型白名单
  37. };
  38. // mongoose config
  39. // config.mongoose = {
  40. // url: 'mongodb://127.0.0.1:27017/smart',
  41. // options: {
  42. // user: 'root',
  43. // pass: 'Ziyouyanfa#@!',
  44. // authSource: 'admin',
  45. // useNewUrlParser: true,
  46. // useCreateIndex: true,
  47. // },
  48. // };
  49. // base路径
  50. config.sendDirMq = 'http://wx.cc-lotus.info/api.weixin.qq.com/cgi-bin/message/template/send?appid=';
  51. // appID
  52. config.appid = 'wxd2e28415cb866c0b';
  53. config.REVIEW_TEMPLATE_ID = 'BI4h0AQpdctm74I7-7PyHAspSMX2oJOTJVQsgrppOag';
  54. config.JOBS_TEMPLATE_ID = 'DLNlkgXVWgWU7cO6pZjpqQiFu0CgWXTPHooJ08d_-xU';
  55. // offer通知
  56. config.OFFER_TEMPLATE_ID = '5u-1J5JdKK7tRk_e1-6zuy6fy7eur2xyOPw_snMRdvw';
  57. // base路径
  58. config.baseDirMq = 'http://smart.jilinjobs.cn';
  59. // 企业信息url
  60. config.corpsDirMq = '/api/corp/corps/';
  61. // 学生信息url
  62. config.stusDirMq = '/api/jobs/studentcorp';
  63. // 学生详细信息
  64. config.strDirMq = '/api/stud/registers/';
  65. config.amqp = {
  66. client: {
  67. hostname: '127.0.0.1',
  68. username: 'smart',
  69. password: 'smart123',
  70. vhost: 'smart',
  71. },
  72. app: true,
  73. agent: true,
  74. };
  75. // mongoose config
  76. config.mongoose = {
  77. url: 'mongodb://127.0.0.1:27017/smart',
  78. options: {
  79. user: 'root',
  80. pass: 'Ziyouyanfa#@!',
  81. authSource: 'admin',
  82. useNewUrlParser: true,
  83. useCreateIndex: true,
  84. },
  85. };
  86. // JWT config
  87. config.jwt = {
  88. ...jwt,
  89. expiresIn: '1d',
  90. issuer: 'jobs',
  91. };
  92. return {
  93. ...config,
  94. ...userConfig,
  95. };
  96. };