config.local.ts 879 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { MidwayConfig } from '@midwayjs/core';
  2. const ip = '127.0.0.1'; //120.48.146.1
  3. const project = 'vue3js-template-test';
  4. export default {
  5. // use for cookie sign key, should change to your own and keep security
  6. keys: '1697684406848_4978',
  7. koa: {
  8. port: 9700,
  9. globalPrefix: '/ts/frame/api',
  10. },
  11. swagger: {
  12. swaggerPath: '/doc/api',
  13. },
  14. jwt: {
  15. secret: 'Ziyouyanfa!@#',
  16. expiresIn: '2d',
  17. },
  18. mongoose: {
  19. dataSource: {
  20. default: {
  21. uri: `mongodb://${ip}:27017/${project}`,
  22. options: {
  23. user: 'admin',
  24. pass: 'admin',
  25. authSource: 'admin',
  26. useNewUrlParser: true,
  27. },
  28. entities: ['./entity'],
  29. },
  30. },
  31. },
  32. upload: {
  33. whitelist: null,
  34. },
  35. weixinConfig: {
  36. appid: 'wxe8b4c4d5e87a7d31',
  37. secret: '60cffc9d8766e8b169db970d2422a647',
  38. },
  39. } as MidwayConfig;