dev-config.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. emailOptions: {
  34. transport: {
  35. type: 'file',
  36. outputPath: path.join(__dirname, 'test-emails'),
  37. },
  38. },
  39. plugins: [
  40. new DefaultAssetServerPlugin({
  41. route: 'assets',
  42. assetUploadDir: path.join(__dirname, 'assets'),
  43. port: 4000,
  44. hostname: 'http://localhost',
  45. previewMaxHeight: 1600,
  46. previewMaxWidth: 1600,
  47. presets: [
  48. { name: 'tiny', width: 50, height: 50, mode: 'crop' },
  49. { name: 'thumb', width: 150, height: 150, mode: 'crop' },
  50. { name: 'small', width: 300, height: 300, mode: 'resize' },
  51. { name: 'medium', width: 500, height: 500, mode: 'resize' },
  52. { name: 'large', width: 800, height: 800, mode: 'resize' },
  53. ],
  54. }),
  55. ],
  56. };