|
@@ -11,35 +11,29 @@ import { ProductResolver } from './api/product/product.resolver';
|
|
|
import { AuthService } from './auth/auth.service';
|
|
import { AuthService } from './auth/auth.service';
|
|
|
import { JwtStrategy } from './auth/jwt.strategy';
|
|
import { JwtStrategy } from './auth/jwt.strategy';
|
|
|
import { PasswordService } from './auth/password.service';
|
|
import { PasswordService } from './auth/password.service';
|
|
|
|
|
+import { getConfig } from './config/vendure-config';
|
|
|
import { TranslationUpdaterService } from './locale/translation-updater.service';
|
|
import { TranslationUpdaterService } from './locale/translation-updater.service';
|
|
|
import { AdministratorService } from './service/administrator.service';
|
|
import { AdministratorService } from './service/administrator.service';
|
|
|
|
|
+import { ConfigService } from './service/config.service';
|
|
|
import { CustomerService } from './service/customer.service';
|
|
import { CustomerService } from './service/customer.service';
|
|
|
|
|
+import { IdCodecService } from './service/id-codec.service';
|
|
|
import { ProductOptionGroupService } from './service/product-option-group.service';
|
|
import { ProductOptionGroupService } from './service/product-option-group.service';
|
|
|
import { ProductOptionService } from './service/product-option.service';
|
|
import { ProductOptionService } from './service/product-option.service';
|
|
|
import { ProductVariantService } from './service/product-variant.service';
|
|
import { ProductVariantService } from './service/product-variant.service';
|
|
|
import { ProductService } from './service/product.service';
|
|
import { ProductService } from './service/product.service';
|
|
|
|
|
|
|
|
|
|
+const connectionOptions = getConfig().connectionOptions;
|
|
|
|
|
+
|
|
|
@Module({
|
|
@Module({
|
|
|
- imports: [
|
|
|
|
|
- GraphQLModule,
|
|
|
|
|
- TypeOrmModule.forRoot({
|
|
|
|
|
- type: 'mysql',
|
|
|
|
|
- entities: ['./**/entity/**/*.entity.ts'],
|
|
|
|
|
- synchronize: true,
|
|
|
|
|
- logging: true,
|
|
|
|
|
- host: '192.168.99.100',
|
|
|
|
|
- port: 3306,
|
|
|
|
|
- username: 'root',
|
|
|
|
|
- password: '',
|
|
|
|
|
- database: 'test',
|
|
|
|
|
- }),
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ imports: [GraphQLModule, TypeOrmModule.forRoot(connectionOptions)],
|
|
|
controllers: [AuthController, CustomerController],
|
|
controllers: [AuthController, CustomerController],
|
|
|
providers: [
|
|
providers: [
|
|
|
AdministratorResolver,
|
|
AdministratorResolver,
|
|
|
AdministratorService,
|
|
AdministratorService,
|
|
|
AuthService,
|
|
AuthService,
|
|
|
|
|
+ ConfigService,
|
|
|
JwtStrategy,
|
|
JwtStrategy,
|
|
|
|
|
+ IdCodecService,
|
|
|
PasswordService,
|
|
PasswordService,
|
|
|
CustomerService,
|
|
CustomerService,
|
|
|
CustomerResolver,
|
|
CustomerResolver,
|