config.default.js 902 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 + '_1579143562333_7771';
  14. // add your middleware config here
  15. config.middleware = [];
  16. // add your user config here
  17. const userConfig = {
  18. // myAppName: 'egg',
  19. };
  20. // add your config here
  21. config.cluster = {
  22. listen: {
  23. port: 9003,
  24. },
  25. };
  26. config.mongoose = {
  27. url: 'mongodb://localhost:27017/platform',
  28. options: {
  29. user: 'demo',
  30. pass: 'demo',
  31. authSource: 'admin',
  32. useNewUrlParser: true,
  33. useCreateIndex: true,
  34. useUnifiedTopology: true,
  35. },
  36. };
  37. return {
  38. ...config,
  39. ...userConfig,
  40. };
  41. };