dev-config.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import path from 'path';
  2. import { API_PATH, API_PORT } from '../shared/shared-constants';
  3. import { examplePaymentHandler } from './src/config/payment-method/example-payment-method-config';
  4. import { OrderProcessOptions, VendureConfig } from './src/config/vendure-config';
  5. import { defaultEmailTypes } from './src/email/default-email-types';
  6. import { HandlebarsMjmlGenerator } from './src/email/handlebars-mjml-generator';
  7. import { DefaultAssetServerPlugin } from './src/plugin';
  8. import { AdminUiPlugin } from './src/plugin/admin-ui-plugin/admin-ui-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. 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: [examplePaymentHandler],
  33. },
  34. customFields: {},
  35. emailOptions: {
  36. emailTemplatePath: path.join(__dirname, 'src/email/templates'),
  37. emailTypes: defaultEmailTypes,
  38. generator: new HandlebarsMjmlGenerator(),
  39. transport: {
  40. type: 'file',
  41. raw: false,
  42. outputPath: path.join(__dirname, 'test-emails'),
  43. },
  44. },
  45. importExportOptions: {
  46. importAssetsDir: path.join(__dirname, 'import-assets'),
  47. },
  48. plugins: [
  49. new DefaultAssetServerPlugin({
  50. route: 'assets',
  51. assetUploadDir: path.join(__dirname, 'assets'),
  52. port: 4000,
  53. }),
  54. new DefaultSearchPlugin(),
  55. new AdminUiPlugin({
  56. port: 3001,
  57. }),
  58. ],
  59. };