dev-config.ts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. }),
  55. new DefaultSearchPlugin(),
  56. ],
  57. };