dev-config.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 { defaultEmailTypes } from './src/email/default-email-types';
  7. import { HandlebarsMjmlGenerator } from './src/email/handlebars-mjml-generator';
  8. import { DefaultAssetServerPlugin } from './src/plugin/default-asset-server/default-asset-server-plugin';
  9. /**
  10. * Config settings used during development
  11. */
  12. export const devConfig: VendureConfig = {
  13. defaultChannelToken: 'default-channel',
  14. authOptions: {
  15. disableAuth: false,
  16. sessionSecret: 'some-secret',
  17. },
  18. port: API_PORT,
  19. apiPath: API_PATH,
  20. dbConnectionOptions: {
  21. type: 'mysql',
  22. synchronize: true,
  23. logging: true,
  24. host: '192.168.99.100',
  25. port: 3306,
  26. username: 'root',
  27. password: '',
  28. database: 'vendure-dev',
  29. },
  30. orderProcessOptions: {} as OrderProcessOptions<any>,
  31. paymentOptions: {
  32. paymentMethodHandlers: [fakePalPaymentHandler, gripePaymentHandler],
  33. },
  34. customFields: {},
  35. emailOptions: {
  36. emailTypes: defaultEmailTypes,
  37. generator: new HandlebarsMjmlGenerator(path.join(__dirname, 'src', 'email', 'templates', 'partials')),
  38. transport: {
  39. type: 'file',
  40. raw: false,
  41. outputPath: path.join(__dirname, 'test-emails'),
  42. },
  43. },
  44. plugins: [
  45. new DefaultAssetServerPlugin({
  46. route: 'assets',
  47. assetUploadDir: path.join(__dirname, 'assets'),
  48. port: 4000,
  49. hostname: 'http://localhost',
  50. previewMaxHeight: 1600,
  51. previewMaxWidth: 1600,
  52. presets: [
  53. { name: 'tiny', width: 50, height: 50, mode: 'crop' },
  54. { name: 'thumb', width: 150, height: 150, mode: 'crop' },
  55. { name: 'small', width: 300, height: 300, mode: 'resize' },
  56. { name: 'medium', width: 500, height: 500, mode: 'resize' },
  57. { name: 'large', width: 800, height: 800, mode: 'resize' },
  58. ],
  59. }),
  60. ],
  61. };