| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- {{#if isTs }}import{{ else }}const{{/if}} {
- AdminUiPlugin,
- examplePaymentHandler,
- DefaultAssetServerPlugin,
- DefaultEmailPlugin,
- DefaultSearchPlugin,
- {{#if isTs}}VendureConfig,{{/if}}
- } {{#if isTs}}from '@vendure/core'; {{ else }}= require('@vendure/core');{{/if}}
- {{#if isTs }}
- import * as path from 'path';
- {{ else }}
- const path = require('path');
- {{/if}}
- {{#if isTs}}export {{/if}}const config{{#if isTs}}: VendureConfig{{/if}} = {
- authOptions: {
- sessionSecret: '{{ sessionSecret }}',
- },
- port: 3000,
- apiPath: 'api',
- dbConnectionOptions: {
- type: '{{ dbType }}',
- {{#if requiresConnection}}
- synchronize: true, // turn this off for production
- {{else}}
- synchronize: false, // not working with SQLite/SQL.js, see https://github.com/typeorm/typeorm/issues/2576
- {{/if}}
- logging: false,
- database: {{#if isSQLjs}}new Uint8Array([]){{else}}'{{ normalizedDbName }}'{{/if}},
- {{#if isSQLjs}}
- location: '{{ normalizedDbName }}',
- autoSave: true,
- {{/if}}
- {{#if requiresConnection}}
- host: '{{ dbHost }}',
- port: {{ dbPort }},
- username: '{{ dbUserName }}',
- password: '{{ dbPassword }}',
- {{/if}}
- },
- paymentOptions: {
- paymentMethodHandlers: [examplePaymentHandler],
- },
- customFields: {},
- importExportOptions: {
- importAssetsDir: path.join(__dirname, 'vendure/import-assets'),
- },
- plugins: [
- new DefaultAssetServerPlugin({
- route: 'assets',
- assetUploadDir: path.join(__dirname, 'vendure/assets'),
- port: 3001,
- }),
- new DefaultEmailPlugin({
- templatePath: path.join(__dirname, 'vendure/email/templates'),
- devMode: true,
- }),
- new DefaultSearchPlugin(),
- new AdminUiPlugin({ port: 3002 }),
- ],
- };
- {{#if isTs}}
- {{else}}
- module.exports = { config };
- {{/if}}
|