config.prod.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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: 'D:\\free\\workspace\\server\\service-file\\upload',
  42. file_type: 'material',
  43. },
  44. wechatSetting: {
  45. // 耗材
  46. materialApp: {
  47. appid: 'wx23c71bee5876d1b9',
  48. secret: 'f8099ebd037df28dc9357ef585ab58ff',
  49. mchid: '1505364491',
  50. v3key: '1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik9',
  51. },
  52. },
  53. } as MidwayConfig;