dev-config.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import { ADMIN_API_PATH, API_PORT, SHOP_API_PATH } from '@vendure/common/lib/shared-constants';
  2. import {
  3. AdminUiPlugin,
  4. DefaultAssetServerPlugin,
  5. defaultEmailTypes,
  6. DefaultSearchPlugin,
  7. examplePaymentHandler,
  8. HandlebarsMjmlGenerator,
  9. VendureConfig,
  10. } from '@vendure/core';
  11. import path from 'path';
  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. };