| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- {{#if isTs }}import{{ else }}const{{/if}} {
- fakePalPaymentHandler,
- gripePaymentHandler,
- defaultEmailTypes,
- HandlebarsMjmlGenerator,
- DefaultAssetServerPlugin,
- DefaultSearchPlugin,
- {{#if isTs}}VendureConfig,{{/if}}
- } {{#if isTs}}from 'vendure'; {{ else }}= require('vendure');{{/if}}
- {{#if isTs }}
- import * as path from 'path';
- {{ else }}
- const path = require('path');
- {{/if}}
- {{#if isTs}}export {{/if}}const config{{#if isTs}}: VendureConfig{{/if}} = {
- defaultChannelToken: 'default-channel',
- authOptions: {
- sessionSecret: '{{ sessionSecret }}',
- },
- port: 3000,
- apiPath: 'api',
- dbConnectionOptions: {
- type: '{{ dbType }}',
- synchronize: true, // turn this off for production
- logging: false,
- database: '{{ dbName }}',
- {{#if isSQLite}}
- {{else}}
- host: '{{ dbHost }}',
- port: {{ dbPort }},
- username: '{{ dbUserName }}',
- password: '{{ dbPassword }}',
- {{/if}}
- },
- paymentOptions: {
- paymentMethodHandlers: [fakePalPaymentHandler, gripePaymentHandler],
- },
- customFields: {},
- emailOptions: {
- emailTypes: defaultEmailTypes,
- generator: new HandlebarsMjmlGenerator(path.join(__dirname, 'vendure', 'email', 'templates', 'partials')),
- transport: {
- type: 'file',
- outputPath: path.join(__dirname, 'vendure', 'email', 'test-emails'),
- },
- },
- importExportOptions: {
- importAssetsDir: path.join(__dirname, 'vendure', 'import-assets'),
- },
- plugins: [
- new DefaultAssetServerPlugin({
- route: 'assets',
- assetUploadDir: path.join(__dirname, 'vendure', 'assets'),
- port: 4000,
- hostname: 'http://localhost',
- previewMaxHeight: 1600,
- previewMaxWidth: 1600,
- presets: [
- { name: 'tiny', width: 50, height: 50, mode: 'crop' },
- { name: 'thumb', width: 150, height: 150, mode: 'crop' },
- { name: 'small', width: 300, height: 300, mode: 'resize' },
- { name: 'medium', width: 500, height: 500, mode: 'resize' },
- { name: 'large', width: 800, height: 800, mode: 'resize' },
- ],
- }),
- new DefaultSearchPlugin(),
- ],
- };
- {{#if isTs}}
- {{else}}
- module.exports = { config };
- {{/if}}
|