config.default.js 856 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 + '_1592062195915_2169';
  14. // add your middleware config here
  15. config.middleware = [];
  16. config.mongoose = {
  17. url: 'mongodb://127.0.0.1/acData',
  18. options: {},
  19. // plugins: [createdPlugin, [updatedPlugin, pluginOptions]],
  20. }
  21. config.cors = {
  22. origin: '*',
  23. allowMethods: 'GET,HEAD,PUT,POST,OPTIONS'
  24. };
  25. config.security = {
  26. csrf: {
  27. enable: false,
  28. }
  29. };
  30. // add your user config here
  31. const userConfig = {
  32. // myAppName: 'egg',
  33. };
  34. return {
  35. ...config,
  36. ...userConfig,
  37. };
  38. };