config.prod.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { MidwayConfig } from '@midwayjs/core';
  2. const ip = '127.0.0.1';
  3. const project = 'material';
  4. const mongodb = 'material_v1';
  5. export default {
  6. // use for cookie sign key, should change to your own and keep security
  7. keys: '1672292154640_5493',
  8. koa: {
  9. globalPrefix: `/${project}/v1/api`,
  10. },
  11. swagger: {
  12. swaggerPath: `/${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. axios: {
  29. clients: {
  30. file: {
  31. baseURL: 'http://broadcast.waityou24.cn',
  32. //表明返回服务器返回的数据类型
  33. responseType: 'arraybuffer',
  34. headers: {
  35. 'Content-Type': 'application/json; application/octet-stream',
  36. },
  37. },
  38. },
  39. },
  40. export: {
  41. root_path: '/mnt/server/service-file/upload/material/',
  42. file_type: 'material',
  43. },
  44. wechatSetting: {
  45. // 耗材
  46. materialApp: {
  47. appid: 'wx23c71bee5876d1b9',
  48. secret: 'aa942570f1d056adf7891a32eb87a818',
  49. },
  50. },
  51. } as MidwayConfig;