2
0

config.default.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 = 'wxdf3ed83c095be97a';
  53. config.REVIEW_TEMPLATE_ID = 'BI4h0AQpdctm74I7-7PyHAspSMX2oJOTJVQsgrppOag';
  54. config.JOBS_TEMPLATE_ID = 'DLNlkgXVWgWU7cO6pZjpqQiFu0CgWXTPHooJ08d_-xU';
  55. // base路径
  56. config.baseDirMq = 'http://smart.cc-lotus.info';
  57. // 企业信息url
  58. config.corpsDirMq = '/api/corp/corps/';
  59. // 学生信息url
  60. config.stusDirMq = '/api/jobs/studentcorp';
  61. // 学生详细信息
  62. config.strDirMq = '/api/stud/registers/';
  63. config.amqp = {
  64. client: {
  65. hostname: '127.0.0.1',
  66. username: 'smart',
  67. password: 'smart123',
  68. vhost: 'smart',
  69. },
  70. app: true,
  71. agent: true,
  72. };
  73. // mongoose config
  74. config.mongoose = {
  75. url: 'mongodb://127.0.0.1:27017/smart',
  76. options: {
  77. user: 'root',
  78. pass: 'Ziyouyanfa#@!',
  79. authSource: 'admin',
  80. useNewUrlParser: true,
  81. useCreateIndex: true,
  82. },
  83. };
  84. // JWT config
  85. config.jwt = {
  86. ...jwt,
  87. expiresIn: '1d',
  88. issuer: 'jobs',
  89. };
  90. return {
  91. ...config,
  92. ...userConfig,
  93. };
  94. };