config.default.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. config.cluster = {
  13. listen: {
  14. port: 11000,
  15. },
  16. };
  17. config.mongoose = {
  18. url: 'mongodb://124.71.143.119:27017/htyd',
  19. options: {
  20. user: 'admin',
  21. pass: '111111',
  22. authSource: 'admin',
  23. useNewUrlParser: true,
  24. useCreateIndex: true,
  25. },
  26. };
  27. // use for cookie sign key, should change to your own and keep security
  28. config.keys = appInfo.name + '_1608805663661_3198';
  29. // add your middleware config here
  30. config.middleware = [];
  31. // add your user config here
  32. const userConfig = {
  33. // myAppName: 'egg',
  34. };
  35. config.appInfo = {
  36. id: 'wx74f916cbbb2173fa',
  37. secret: '3cc515d634c854d60ec8b341119ada09',
  38. store: '1606113941',
  39. storeKey: 'hongtaiyuedawangluohuliankejighw',
  40. };
  41. // redis config
  42. config.redis = {
  43. client: {
  44. port: 6379, // Redis port
  45. host: '127.0.0.1', // Redis host
  46. password: 123456,
  47. db: 0,
  48. },
  49. };
  50. return {
  51. ...config,
  52. ...userConfig,
  53. };
  54. };