config.local.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import { MidwayConfig } from '@midwayjs/core';
  2. const ip = '127.0.0.1';
  3. const project = 'file';
  4. const mongodb = 'school_friend_v1';
  5. export default {
  6. // use for cookie sign key, should change to your own and keep security
  7. keys: '1672292154640_488',
  8. koa: {
  9. globalPrefix: `/${project}`,
  10. },
  11. swagger: {
  12. swaggerPath: `/dev/${project}/v1/api/doc`,
  13. },
  14. mongoose: {
  15. dataSource: {
  16. default: {
  17. uri: `mongodb://${ip}:27017/${mongodb}`,
  18. options: {
  19. user: 'admin',
  20. pass: 'admin',
  21. authSource: 'admin',
  22. useNewUrlParser: true,
  23. },
  24. entities: ['./entity'],
  25. },
  26. },
  27. },
  28. bull: {
  29. // defaultQueueOptions: {
  30. // redis: {
  31. // port: 6379,
  32. // host: '114.215.24.90',
  33. // password: '123456',
  34. // },
  35. // prefix: '{midway-bull}',
  36. // },
  37. },
  38. axios: {
  39. clients: {
  40. file: {
  41. baseURL: 'https://www.ccwit.net',
  42. //表明返回服务器返回的数据类型
  43. responseType: 'arraybuffer',
  44. headers: {
  45. 'Content-Type': 'application/json; application/octet-stream',
  46. },
  47. },
  48. },
  49. },
  50. export: {
  51. root_path: 'D:\\temp',
  52. file_type: 'friendSchool',
  53. },
  54. wechatSetting: {
  55. // 吉林大学汽车工程学院校友会
  56. friendShoolApp: {
  57. appid: 'wxef5b87d5fef241b4',
  58. secret: 'd315753502e0cbc24de5a230bed5c87a',
  59. mchid: '1505364491',
  60. v3key: '1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik9',
  61. },
  62. },
  63. } as MidwayConfig;