feat: route all 4 microservices through api-gateway for Render deployment (/sync, /catalog, /storefront, /b2b)
This commit is contained in:
1 parent
013710c6f7
commit
5ef8097315
6 files changed
+18
-4
No files matched your search
@@ -27,6 +27,12 @@ export class ApiGatewayController {
|
||||
status: dbStatus === 'connected' ? 'ok' : 'degraded',
|
||||
service: 'api-gateway',
|
||||
database: dbStatus,
|
||||
services: {
|
||||
sync: 'active (/sync)',
|
||||
catalog: 'active (/catalog)',
|
||||
storefront: 'active (/storefront)',
|
||||
b2b: 'active (/b2b)',
|
||||
},
|
||||
timestamp: new Date().toISOString(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,6 +4,10 @@ import { DatabaseModule } from '@lib/database';
|
||||
import { validateEnv } from '@lib/common';
|
||||
import { ApiGatewayController } from './api-gateway.controller.js';
|
||||
import { ApiGatewayService } from './api-gateway.service.js';
|
||||
import { SyncServiceModule } from '../../sync-service/src/sync-service.module.js';
|
||||
import { CatalogServiceModule } from '../../catalog-service/src/catalog-service.module.js';
|
||||
import { StorefrontServiceModule } from '../../storefront-service/src/storefront-service.module.js';
|
||||
import { B2bAnalyticsServiceModule } from '../../b2b-analytics-service/src/b2b-analytics-service.module.js';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@@ -12,6 +16,10 @@ import { ApiGatewayService } from './api-gateway.service.js';
|
||||
validate: validateEnv,
|
||||
}),
|
||||
DatabaseModule,
|
||||
SyncServiceModule,
|
||||
CatalogServiceModule,
|
||||
StorefrontServiceModule,
|
||||
B2bAnalyticsServiceModule,
|
||||
],
|
||||
controllers: [ApiGatewayController],
|
||||
providers: [ApiGatewayService],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { B2bAnalyticsServiceService } from './b2b-analytics-service.service.js';
|
||||
|
||||
@Controller()
|
||||
@Controller('b2b')
|
||||
export class B2bAnalyticsServiceController {
|
||||
constructor(private readonly b2bAnalyticsServiceService: B2bAnalyticsServiceService) {}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { CatalogServiceService } from './catalog-service.service.js';
|
||||
|
||||
@Controller()
|
||||
@Controller('catalog')
|
||||
export class CatalogServiceController {
|
||||
constructor(private readonly catalogServiceService: CatalogServiceService) {}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { StorefrontServiceService } from './storefront-service.service.js';
|
||||
|
||||
@Controller()
|
||||
@Controller('storefront')
|
||||
export class StorefrontServiceController {
|
||||
constructor(private readonly storefrontServiceService: StorefrontServiceService) {}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { SyncServiceService } from './sync-service.service.js';
|
||||
|
||||
@Controller()
|
||||
@Controller('sync')
|
||||
export class SyncServiceController {
|
||||
constructor(private readonly syncServiceService: SyncServiceService) {}
|
||||
|
||||
|
||||
Reference in new issue
Block a user