dev-config.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import { AdminUiPlugin } from '@vendure/admin-ui-plugin';
  2. import { AssetServerPlugin } from '@vendure/asset-server-plugin';
  3. import { ADMIN_API_PATH, API_PORT, SHOP_API_PATH } from '@vendure/common/lib/shared-constants';
  4. import {
  5. DefaultSearchPlugin,
  6. examplePaymentHandler,
  7. VendureConfig,
  8. } from '@vendure/core';
  9. import { defaultEmailHandlers, EmailPlugin } from '@vendure/email-plugin';
  10. import path from 'path';
  11. /**
  12. * Config settings used during development
  13. */
  14. export const devConfig: VendureConfig = {
  15. authOptions: {
  16. disableAuth: false,
  17. sessionSecret: 'some-secret',
  18. requireVerification: true,
  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. importExportOptions: {
  46. importAssetsDir: path.join(__dirname, 'import-assets'),
  47. },
  48. plugins: [
  49. new AssetServerPlugin({
  50. route: 'assets',
  51. assetUploadDir: path.join(__dirname, 'assets'),
  52. port: 5002,
  53. }),
  54. new DefaultSearchPlugin(),
  55. new EmailPlugin({
  56. devMode: true,
  57. handlers: defaultEmailHandlers,
  58. templatePath: path.join(__dirname, '../email-plugin/templates'),
  59. outputPath: path.join(__dirname, 'test-emails'),
  60. mailboxPort: 5003,
  61. }),
  62. new AdminUiPlugin({
  63. port: 5001,
  64. }),
  65. ],
  66. };