dev-config.ts 2.3 KB

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