dev-config.ts 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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: true,
  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. orderProcessOptions: {} as OrderProcessOptions<any>,
  42. paymentOptions: {
  43. paymentMethodHandlers: [examplePaymentHandler],
  44. },
  45. customFields: {},
  46. emailOptions: {
  47. emailTemplatePath: path.join(__dirname, 'src/email/templates'),
  48. emailTypes: defaultEmailTypes,
  49. generator: new HandlebarsMjmlGenerator(),
  50. transport: {
  51. type: 'file',
  52. raw: false,
  53. outputPath: path.join(__dirname, 'test-emails'),
  54. },
  55. templateVars: {
  56. shopUrl: 'http://localhost:4201/',
  57. },
  58. },
  59. importExportOptions: {
  60. importAssetsDir: path.join(__dirname, 'import-assets'),
  61. },
  62. plugins: [
  63. new DefaultAssetServerPlugin({
  64. route: 'assets',
  65. assetUploadDir: path.join(__dirname, 'assets'),
  66. port: 5002,
  67. }),
  68. new DefaultSearchPlugin(),
  69. new AdminUiPlugin({
  70. port: 5001,
  71. }),
  72. ],
  73. };