config.default.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 + '_1579225760252_7743';
  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: 9009,
  24. },
  25. };
  26. config.mongoose = {
  27. url: 'mongodb://localhost:27017/platform',
  28. options: {
  29. // user: 'admin',
  30. // pass: 'admin',
  31. // authSource: 'admin',
  32. // useNewUrlParser: true,
  33. // useCreateIndex: true,
  34. // useUnifiedTopology: true,
  35. },
  36. };
  37. config.amqp = {
  38. client: {
  39. hostname: '127.0.0.1',
  40. username: 'visit',
  41. password: 'visit',
  42. vhost: 'visit',
  43. },
  44. app: true,
  45. agent: true,
  46. };
  47. return {
  48. ...config,
  49. ...userConfig,
  50. };
  51. };