config.default.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 + '_1625793914189_5278';
  14. // add your middleware config here
  15. config.middleware = [];
  16. // add your user config here
  17. const userConfig = {
  18. // myAppName: 'egg',
  19. };
  20. config.cluster = {
  21. listen: {
  22. port: 9106,
  23. },
  24. };
  25. config.amqp = {
  26. client: {
  27. hostname: '127.0.0.1',
  28. username: 'visit',
  29. password: 'visit',
  30. vhost: 'platform',
  31. },
  32. app: true,
  33. agent: true,
  34. };
  35. config.dbName = 'customer';
  36. config.mongoose = {
  37. url: `mongodb://localhost:27017/${config.dbName}`,
  38. options: {
  39. // user: 'admin',
  40. // pass: '111111',
  41. // authSource: 'admin',
  42. // useNewUrlParser: true,
  43. // useCreateIndex: true,
  44. },
  45. };
  46. config.project = {
  47. hnhmain: 'http://127.0.0.1:9201',
  48. };
  49. return {
  50. ...config,
  51. ...userConfig,
  52. };
  53. };