Skip to content

Commit 261dbd2

Browse files
committed
feat(stac-api): export API url from pgStacApi construct
1 parent d34c6cd commit 261dbd2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/stac-api/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import { HttpLambdaIntegration } from "@aws-cdk/aws-apigatewayv2-integrations-al
1515
import { Construct } from "constructs";
1616

1717
export class PgStacApiLambda extends Construct {
18+
readonly url: string;
19+
1820
constructor(scope: Construct, id: string, props: PgStacApiLambdaProps) {
1921
super(scope, id);
2022

@@ -58,9 +60,11 @@ export class PgStacApiLambda extends Construct {
5860
defaultIntegration: new HttpLambdaIntegration("integration", handler),
5961
});
6062

63+
this.url = stacApi.url!;
64+
6165
new CfnOutput(this, "stac-api-output", {
6266
exportName: `${Stack.of(this).stackName}-url`,
63-
value: stacApi.url!,
67+
value: this.url,
6468
});
6569
}
6670
}

0 commit comments

Comments
 (0)