dev-config.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import path from 'path';
  2. import { ADMIN_API_PATH, API_PORT, SHOP_API_PATH } from '../shared/shared-constants';
  3. import { TestingEntityIdStrategy } from './e2e/config/testing-entity-id-strategy';
  4. import { examplePaymentHandler } from './src/config/payment-method/example-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 { AdminUiPlugin } from './src/plugin/admin-ui-plugin/admin-ui-plugin';
  10. import { DefaultSearchPlugin } from './src/plugin/default-search-plugin/default-search-plugin';
  11. /**
  12. * Config settings used during development
  13. */
  14. export const devConfig: VendureConfig = {
  15. authOptions: {
  16. disableAuth: false,
  17. sessionSecret: 'some-secret',
  18. requireVerification: false,
  19. },
  20. port: API_PORT,
  21. adminApiPath: ADMIN_API_PATH,
  22. shopApiPath: SHOP_API_PATH,
  23. dbConnectionOptions: {
  24. synchronize: false,
  25. logging: false,
  26. type: 'mysql',
  27. host: '192.168.99.100',
  28. port: 3306,
  29. username: 'root',
  30. password: '',
  31. database: 'vendure-dev',
  32. // type: 'sqlite',
  33. // database: path.join(__dirname, 'vendure.sqlite'),
  34. // type: 'postgres',
  35. // host: '127.0.0.1',
  36. // port: 5432,
  37. // username: 'postgres',
  38. // password: 'Be70',
  39. // database: 'vendure',
  40. },
  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. templateVars: {
  55. shopUrl: 'http://localhost:4201/',
  56. },
  57. },
  58. importExportOptions: {
  59. importAssetsDir: path.join(__dirname, 'import-assets'),
  60. },
  61. plugins: [
  62. new DefaultAssetServerPlugin({
  63. route: 'assets',
  64. assetUploadDir: path.join(__dirname, 'assets'),
  65. port: 5002,
  66. }),
  67. new DefaultSearchPlugin(),
  68. new AdminUiPlugin({
  69. port: 5001,
  70. }),
  71. ],
  72. };