MCPcopy Create free account
hub / github.com/awsrun/aws-microservices / constructor

Method constructor

lib/aws-microservices-stack.ts:10–36  ·  view source on GitHub ↗
(scope: Construct, id: string, props?: StackProps)

Source from the content-addressed store, hash-verified

8
9export class AwsMicroservicesStack extends Stack {
10 constructor(scope: Construct, id: string, props?: StackProps) {
11 super(scope, id, props);
12
13 const database = new SwnDatabase(this, 'Database');
14
15 const microservices = new SwnMicroservices(this, 'Microservices', {
16 productTable: database.productTable,
17 basketTable: database.basketTable,
18 orderTable: database.orderTable
19 });
20
21 const apigateway = new SwnApiGateway(this, 'ApiGateway', {
22 productMicroservice: microservices.productMicroservice,
23 basketMicroservice: microservices.basketMicroservice,
24 orderingMicroservices: microservices.orderingMicroservice
25 });
26
27 const queue = new SwnQueue(this, 'Queue', {
28 consumer: microservices.orderingMicroservice
29 });
30
31 const eventbus = new SwnEventBus(this, 'EventBus', {
32 publisherFuntion: microservices.basketMicroservice,
33 targetQueue: queue.orderQueue
34 });
35
36 }
37}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected