in cdk/lib/stack/backend.ts [12:47]
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const auth = new Auth(this, `Auth`);
const storage = new Storage(this, `Storage`);
const handler = new Handler(this, `Handler`, {
userPool: auth.userPool,
userPoolClient: auth.userPoolClient,
connectionIdTable: storage.connectionIdTable,
});
const websocket = new WebSocket(this, `Websocket`, {
authHandler: handler.authHandler,
websocketHandler: handler.websocketHandler,
});
websocket.api.grantManageConnections(handler.websocketHandler);
{
new cdk.CfnOutput(this, `Region`, {
value: cdk.Stack.of(this).region,
});
new cdk.CfnOutput(this, `UserPoolId`, {
value: auth.userPool.userPoolId,
});
new cdk.CfnOutput(this, `UserPoolWebClientId`, {
value: auth.userPoolClient.userPoolClientId,
});
new cdk.CfnOutput(this, `WebSocketEndpoint`, {
value: websocket.apiEndpoint,
});
}
}