config.default.js 798 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. // use for cookie sign key, should change to your own and keep security
  13. config.keys = appInfo.name + '_1618556380571_5956';
  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: 9200,
  23. },
  24. };
  25. config.security = {
  26. csrf: {
  27. enable: false,
  28. type: 'ctoken',
  29. useSession: true,
  30. },
  31. };
  32. config.project = {
  33. main: 'http://127.0.0.1:9201',
  34. };
  35. return {
  36. ...config,
  37. ...userConfig,
  38. };
  39. };