dev-config.ts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. disableAuth: false,
  10. port: API_PORT,
  11. apiPath: API_PATH,
  12. cors: true,
  13. jwtSecret: 'some-secret',
  14. dbConnectionOptions: {
  15. type: 'mysql',
  16. synchronize: true,
  17. logging: true,
  18. host: '192.168.99.100',
  19. port: 3306,
  20. username: 'root',
  21. password: '',
  22. database: 'vendure-dev',
  23. },
  24. customFields: {
  25. Facet: [{ name: 'searchable', type: 'boolean' }],
  26. FacetValue: [{ name: 'link', type: 'string' }, { name: 'available', type: 'boolean' }],
  27. Product: [
  28. { name: 'infoUrl', type: 'string' },
  29. { name: 'downloadable', type: 'boolean' },
  30. { name: 'nickname', type: 'localeString' },
  31. ],
  32. },
  33. plugins: [
  34. new DefaultAssetServerPlugin({
  35. route: 'assets',
  36. assetUploadDir: path.join(__dirname, 'assets'),
  37. port: 4000,
  38. hostname: 'http://localhost',
  39. previewMaxHeight: 1600,
  40. previewMaxWidth: 1600,
  41. presets: [
  42. { name: 'tiny', width: 50, height: 50, mode: 'crop' },
  43. { name: 'thumb', width: 150, height: 150, mode: 'crop' },
  44. { name: 'small', width: 300, height: 300, mode: 'resize' },
  45. { name: 'medium', width: 500, height: 500, mode: 'resize' },
  46. { name: 'large', width: 800, height: 800, mode: 'resize' },
  47. ],
  48. }),
  49. ],
  50. };