config.default.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 + '_1665483162811_546';
  14. // add your middleware config here
  15. config.middleware = [];
  16. // add your user config here
  17. const userConfig = {
  18. // myAppName: 'egg',
  19. };
  20. // redis设置
  21. config.redis = {
  22. client: {
  23. port: 6379, // Redis port
  24. host: '127.0.0.1', // Redis host
  25. password: '123456',
  26. db: 9,
  27. },
  28. };
  29. // 进程设置
  30. config.cluster = {
  31. listen: {
  32. port: 14002,
  33. },
  34. };
  35. // 数据库设置
  36. config.dbName = 'service-email';
  37. config.mongoose = {
  38. url: `mongodb://localhost:27017/${config.dbName}`,
  39. options: {
  40. user: 'admin',
  41. pass: 'admin',
  42. authSource: 'admin',
  43. useNewUrlParser: true,
  44. useCreateIndex: true,
  45. },
  46. };
  47. // 邮件发送人
  48. config.sender = {
  49. free: {
  50. from: '福瑞科技',
  51. user: 'myhope1977@163.com', // 邮箱账号
  52. pass: 'RZGYKLOQUTRCNLEO', // 邮箱stmp授权码
  53. },
  54. tehq: {
  55. from: '天恩活泉',
  56. user: 'gzsdcsmfzyxgs@163.com',
  57. pass: 'URWCTDJNYKVOBBRN',
  58. },
  59. jcyjdtglpt: {
  60. from: '基础研究动态管理平台',
  61. user: 'myhope1977@163.com',
  62. pass: 'RZGYKLOQUTRCNLEO',
  63. },
  64. shoppingOne: {
  65. from: '丽姐品牌内衣店',
  66. user: 'myhope1977@163.com', // 邮箱账号
  67. pass: 'RZGYKLOQUTRCNLEO', // 邮箱stmp授权码
  68. },
  69. wx: {
  70. from: 'wx服务',
  71. user: 'myhope1977@163.com', // 邮箱账号
  72. pass: 'RZGYKLOQUTRCNLEO', // 邮箱stmp授权码
  73. },
  74. };
  75. // 开发人员邮箱,","分隔
  76. config.devPerson = '402788946@qq.com';
  77. // 路由设置
  78. config.routePrefix = '/semail/api';
  79. return {
  80. ...config,
  81. ...userConfig,
  82. };
  83. };