dev-config.ts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. 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: [examplePaymentHandler],
  34. },
  35. customFields: {
  36. GlobalSettings: [{ name: 'royalMailId', type: 'string' }],
  37. },
  38. emailOptions: {
  39. emailTemplatePath: path.join(__dirname, 'src/email/templates'),
  40. emailTypes: defaultEmailTypes,
  41. generator: new HandlebarsMjmlGenerator(),
  42. transport: {
  43. type: 'file',
  44. raw: false,
  45. outputPath: path.join(__dirname, 'test-emails'),
  46. },
  47. },
  48. importExportOptions: {
  49. importAssetsDir: path.join(__dirname, 'import-assets'),
  50. },
  51. plugins: [
  52. new DefaultAssetServerPlugin({
  53. route: 'assets',
  54. assetUploadDir: path.join(__dirname, 'assets'),
  55. port: 4000,
  56. }),
  57. new DefaultSearchPlugin(),
  58. new AdminUiPlugin({
  59. port: 3001,
  60. }),
  61. ],
  62. };