dev-config.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import * as path from 'path';
  2. import { API_PATH, API_PORT } from 'shared/shared-constants';
  3. import { VendureConfig } from './src/config/vendure-config';
  4. import { DefaultAssetServerPlugin } from './src/plugin/default-asset-server/default-asset-server-plugin';
  5. /**
  6. * Config settings used during development
  7. */
  8. export const devConfig: VendureConfig = {
  9. defaultChannelToken: 'default-channel',
  10. authOptions: {
  11. disableAuth: false,
  12. sessionSecret: 'some-secret',
  13. },
  14. port: API_PORT,
  15. apiPath: API_PATH,
  16. dbConnectionOptions: {
  17. type: 'mysql',
  18. synchronize: true,
  19. logging: true,
  20. host: '192.168.99.100',
  21. port: 3306,
  22. username: 'root',
  23. password: '',
  24. database: 'vendure-dev',
  25. },
  26. customFields: {
  27. Facet: [{ name: 'searchable', type: 'boolean' }],
  28. FacetValue: [{ name: 'link', type: 'string' }, { name: 'available', type: 'boolean' }],
  29. Product: [
  30. { name: 'infoUrl', type: 'string' },
  31. { name: 'downloadable', type: 'boolean' },
  32. { name: 'nickname', type: 'localeString' },
  33. ],
  34. },
  35. plugins: [
  36. new DefaultAssetServerPlugin({
  37. route: 'assets',
  38. assetUploadDir: path.join(__dirname, 'assets'),
  39. port: 4000,
  40. hostname: 'http://localhost',
  41. previewMaxHeight: 1600,
  42. previewMaxWidth: 1600,
  43. presets: [
  44. { name: 'tiny', width: 50, height: 50, mode: 'crop' },
  45. { name: 'thumb', width: 150, height: 150, mode: 'crop' },
  46. { name: 'small', width: 300, height: 300, mode: 'resize' },
  47. { name: 'medium', width: 500, height: 500, mode: 'resize' },
  48. { name: 'large', width: 800, height: 800, mode: 'resize' },
  49. ],
  50. }),
  51. ],
  52. };