config.default.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* eslint valid-jsdoc: "off" */
  2. 'use strict';
  3. /**
  4. * @param {Egg.EggAppInfo} appInfo app info
  5. */
  6. module.exports = appInfo => {
  7. /**
  8. * built-in config
  9. * @type {Egg.EggAppConfig}
  10. **/
  11. const config = (exports = {});
  12. // use for cookie sign key, should change to your own and keep security
  13. config.keys = appInfo.name + '_1663725200927_6862';
  14. // add your middleware config here
  15. config.middleware = [];
  16. // add your user config here
  17. const userConfig = {
  18. // myAppName: 'egg',
  19. };
  20. // 进程设置
  21. config.cluster = {
  22. listen: {
  23. port: 11011,
  24. },
  25. };
  26. // 路由设置
  27. config.routePrefix = '/disk/api';
  28. config.dirRoot = 'D:\\temp\\temp';
  29. // 检查的盘符
  30. config.checkDrive = 'D:';
  31. // 占用空间警告线
  32. config.redLine = 80; // 百分制
  33. // 邮件发送人
  34. config.sender = {
  35. user: 'myhope1977@163.com', // 邮箱账号
  36. pass: 'RZGYKLOQUTRCNLEO', // 邮箱stmp授权码
  37. };
  38. // 邮件接收人,多个人用 "," 分隔
  39. config.receiver = '402788946@qq.com';
  40. return {
  41. ...config,
  42. ...userConfig,
  43. };
  44. };