dev-config.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import path from 'path';
  2. import { ADMIN_API_PATH, API_PORT, SHOP_API_PATH } 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. requireVerification: false,
  18. },
  19. port: API_PORT,
  20. adminApiPath: ADMIN_API_PATH,
  21. shopApiPath: SHOP_API_PATH,
  22. dbConnectionOptions: {
  23. synchronize: false,
  24. logging: false,
  25. type: 'mysql',
  26. host: '192.168.99.100',
  27. port: 3306,
  28. username: 'root',
  29. password: '',
  30. database: 'vendure-dev',
  31. // type: 'sqlite',
  32. // database: path.join(__dirname, 'vendure.sqlite'),
  33. // type: 'postgres',
  34. // host: '127.0.0.1',
  35. // port: 5432,
  36. // username: 'postgres',
  37. // password: 'Be70',
  38. // database: 'vendure',
  39. },
  40. orderProcessOptions: {} as OrderProcessOptions<any>,
  41. paymentOptions: {
  42. paymentMethodHandlers: [examplePaymentHandler],
  43. },
  44. customFields: {},
  45. emailOptions: {
  46. emailTemplatePath: path.join(__dirname, 'src/email/templates'),
  47. emailTypes: defaultEmailTypes,
  48. generator: new HandlebarsMjmlGenerator(),
  49. transport: {
  50. type: 'file',
  51. raw: false,
  52. outputPath: path.join(__dirname, 'test-emails'),
  53. },
  54. },
  55. importExportOptions: {
  56. importAssetsDir: path.join(__dirname, 'import-assets'),
  57. },
  58. plugins: [
  59. new DefaultAssetServerPlugin({
  60. route: 'assets',
  61. assetUploadDir: path.join(__dirname, 'assets'),
  62. port: 5002,
  63. }),
  64. new DefaultSearchPlugin(),
  65. new AdminUiPlugin({
  66. port: 5001,
  67. }),
  68. ],
  69. };