dev-config.ts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import {
  2. AdminUiPlugin,
  3. DefaultAssetServerPlugin,
  4. defaultEmailTypes,
  5. DefaultSearchPlugin,
  6. examplePaymentHandler,
  7. HandlebarsMjmlGenerator,
  8. VendureConfig,
  9. } from '@vendure/core';
  10. import path from 'path';
  11. import { ADMIN_API_PATH, API_PORT, SHOP_API_PATH } from '../common/shared-constants';
  12. /**
  13. * Config settings used during development
  14. */
  15. export const devConfig: VendureConfig = {
  16. authOptions: {
  17. disableAuth: false,
  18. sessionSecret: 'some-secret',
  19. requireVerification: false,
  20. },
  21. port: API_PORT,
  22. adminApiPath: ADMIN_API_PATH,
  23. shopApiPath: SHOP_API_PATH,
  24. dbConnectionOptions: {
  25. synchronize: false,
  26. logging: false,
  27. type: 'mysql',
  28. host: '192.168.99.100',
  29. port: 3306,
  30. username: 'root',
  31. password: '',
  32. database: 'vendure-dev',
  33. // type: 'sqlite',
  34. // database: path.join(__dirname, 'vendure.sqlite'),
  35. // type: 'postgres',
  36. // host: '127.0.0.1',
  37. // port: 5432,
  38. // username: 'postgres',
  39. // password: 'Be70',
  40. // database: 'vendure',
  41. },
  42. paymentOptions: {
  43. paymentMethodHandlers: [examplePaymentHandler],
  44. },
  45. customFields: {},
  46. emailOptions: {
  47. emailTemplatePath: path.join(__dirname, '../core/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. };