dev-config.ts 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. importExportOptions: {
  45. importAssetsDir: path.join(__dirname, 'import-assets'),
  46. },
  47. plugins: [
  48. new DefaultAssetServerPlugin({
  49. route: 'assets',
  50. assetUploadDir: path.join(__dirname, 'assets'),
  51. port: 4000,
  52. hostname: 'http://localhost',
  53. previewMaxHeight: 1600,
  54. previewMaxWidth: 1600,
  55. presets: [
  56. { name: 'tiny', width: 50, height: 50, mode: 'crop' },
  57. { name: 'thumb', width: 150, height: 150, mode: 'crop' },
  58. { name: 'small', width: 300, height: 300, mode: 'resize' },
  59. { name: 'medium', width: 500, height: 500, mode: 'resize' },
  60. { name: 'large', width: 800, height: 800, mode: 'resize' },
  61. ],
  62. }),
  63. ],
  64. };