vendure-config.hbs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {{#if isTs }}import{{ else }}const{{/if}} {
  2. fakePalPaymentHandler,
  3. gripePaymentHandler,
  4. defaultEmailTypes,
  5. HandlebarsMjmlGenerator,
  6. {{#if isTs}}VendureConfig,{{/if}}
  7. } {{#if isTs}}from 'vendure'; {{ else }}= require('vendure');{{/if}}
  8. {{#if isTs }}
  9. import * as path from 'path';
  10. {{ else }}
  11. const path = require('path');
  12. {{/if}}
  13. {{#if isTs}}export {{/if}}const config{{#if isTs}}: VendureConfig{{/if}} = {
  14. defaultChannelToken: 'default-channel',
  15. authOptions: {
  16. sessionSecret: '{{ sessionSecret }}',
  17. },
  18. port: 3000,
  19. apiPath: 'api',
  20. dbConnectionOptions: {
  21. type: '{{ dbType }}',
  22. synchronize: true, // turn this off for production
  23. logging: false,
  24. database: '{{ dbName }}',
  25. {{#if isSQLite}}
  26. {{else}}
  27. host: '{{ dbHost }}',
  28. port: {{ dbPort }},
  29. username: '{{ dbUserName }}',
  30. password: '{{ dbPassword }}',
  31. {{/if}}
  32. },
  33. paymentOptions: {
  34. paymentMethodHandlers: [fakePalPaymentHandler, gripePaymentHandler],
  35. },
  36. customFields: {},
  37. emailOptions: {
  38. emailTypes: defaultEmailTypes,
  39. generator: new HandlebarsMjmlGenerator(path.join(__dirname, 'vendure', 'email', 'templates', 'partials')),
  40. transport: {
  41. type: 'file',
  42. outputPath: path.join(__dirname, 'vendure', 'email', 'test-emails'),
  43. },
  44. },
  45. importExportOptions: {
  46. importAssetsDir: path.join(__dirname, 'vendure', 'import-assets'),
  47. },
  48. plugins: [],
  49. };
  50. {{#if isTs}}
  51. {{else}}
  52. module.exports = { config };
  53. {{/if}}