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 { fakePalPaymentHandler } from './src/config/payment-method/fakepal-payment-method-config';
  4. import { gripePaymentHandler } from './src/config/payment-method/gripe-payment-method-config';
  5. import { OrderProcessOptions, VendureConfig } from './src/config/vendure-config';
  6. import { DefaultAssetServerPlugin } from './src/plugin/default-asset-server/default-asset-server-plugin';
  7. /**
  8. * Config settings used during development
  9. */
  10. export const devConfig: VendureConfig = {
  11. defaultChannelToken: 'default-channel',
  12. authOptions: {
  13. disableAuth: false,
  14. sessionSecret: 'some-secret',
  15. },
  16. port: API_PORT,
  17. apiPath: API_PATH,
  18. dbConnectionOptions: {
  19. type: 'mysql',
  20. synchronize: true,
  21. logging: true,
  22. host: '192.168.99.100',
  23. port: 3306,
  24. username: 'root',
  25. password: '',
  26. database: 'vendure-dev',
  27. },
  28. orderProcessOptions: {} as OrderProcessOptions<any>,
  29. paymentOptions: {
  30. paymentMethodHandlers: [fakePalPaymentHandler, gripePaymentHandler],
  31. },
  32. customFields: {},
  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. };