|
|
@@ -2,7 +2,13 @@
|
|
|
import { AdminUiPlugin } from '@vendure/admin-ui-plugin';
|
|
|
import { AssetServerPlugin } from '@vendure/asset-server-plugin';
|
|
|
import { ADMIN_API_PATH, API_PORT, SHOP_API_PATH } from '@vendure/common/lib/shared-constants';
|
|
|
-import { DefaultLogger, DefaultSearchPlugin, examplePaymentHandler, LogLevel, VendureConfig } from '@vendure/core';
|
|
|
+import {
|
|
|
+ DefaultLogger,
|
|
|
+ DefaultSearchPlugin,
|
|
|
+ examplePaymentHandler,
|
|
|
+ LogLevel,
|
|
|
+ VendureConfig,
|
|
|
+} from '@vendure/core';
|
|
|
import { ElasticsearchPlugin } from '@vendure/elasticsearch-plugin';
|
|
|
import { defaultEmailHandlers, EmailPlugin } from '@vendure/email-plugin';
|
|
|
import path from 'path';
|
|
|
@@ -39,18 +45,19 @@ export const devConfig: VendureConfig = {
|
|
|
importAssetsDir: path.join(__dirname, 'import-assets'),
|
|
|
},
|
|
|
plugins: [
|
|
|
- new AssetServerPlugin({
|
|
|
+ AssetServerPlugin.init({
|
|
|
route: 'assets',
|
|
|
assetUploadDir: path.join(__dirname, 'assets'),
|
|
|
// assetUploadDir: path.join(__dirname, '../../../../kbart/artsupplies-vendure/server/vendure/assets'),
|
|
|
port: 5002,
|
|
|
}),
|
|
|
- new DefaultSearchPlugin(),
|
|
|
- // new ElasticsearchPlugin({
|
|
|
+ DefaultSearchPlugin,
|
|
|
+ RestPlugin,
|
|
|
+ // ElasticsearchPlugin.init({
|
|
|
// host: 'http://192.168.99.100',
|
|
|
// port: 9200,
|
|
|
// }),
|
|
|
- new EmailPlugin({
|
|
|
+ EmailPlugin.init({
|
|
|
devMode: true,
|
|
|
handlers: defaultEmailHandlers,
|
|
|
templatePath: path.join(__dirname, '../email-plugin/templates'),
|
|
|
@@ -62,7 +69,7 @@ export const devConfig: VendureConfig = {
|
|
|
changeEmailAddressUrl: 'http://localhost:4201/change-email-address',
|
|
|
},
|
|
|
}),
|
|
|
- new AdminUiPlugin({
|
|
|
+ AdminUiPlugin.init({
|
|
|
port: 5001,
|
|
|
}),
|
|
|
],
|
|
|
@@ -86,7 +93,7 @@ function getDbConfig(): ConnectionOptions {
|
|
|
console.log('Using sqlite connection');
|
|
|
return {
|
|
|
type: 'sqlite',
|
|
|
- database: path.join(__dirname, 'vendure.sqlite'),
|
|
|
+ database: path.join(__dirname, 'vendure.sqlite'),
|
|
|
};
|
|
|
case 'sqljs':
|
|
|
console.log('Using sql.js connection');
|