config.default.js 843 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. config.cluster = {
  13. listen: {
  14. port: 11000,
  15. },
  16. };
  17. config.mongoose = {
  18. url: 'mongodb://localhost:27017/htyd',
  19. options: {
  20. user: 'admin',
  21. pass: '111111',
  22. authSource: 'admin',
  23. useNewUrlParser: true,
  24. useCreateIndex: true,
  25. },
  26. };
  27. // use for cookie sign key, should change to your own and keep security
  28. config.keys = appInfo.name + '_1608805663661_3198';
  29. // add your middleware config here
  30. config.middleware = [];
  31. // add your user config here
  32. const userConfig = {
  33. // myAppName: 'egg',
  34. };
  35. return {
  36. ...config,
  37. ...userConfig,
  38. };
  39. };