dev-config.ts 2.5 KB

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