diff --git a/backendAWS/bin/backend_aws.ts b/backendAWS/bin/backend_aws.ts index af545c1823b4ff91186cbe5510851440406155dc..bf2d2b0ab050002db5da1edb9aa3371514ac94ee 100644 --- a/backendAWS/bin/backend_aws.ts +++ b/backendAWS/bin/backend_aws.ts @@ -43,6 +43,5 @@ new ApiGatewayStack(app, 'ContactApp-ApiGatewayStack', { }); new FrontendStack(app, 'ContactApp-FrontendStack', { - contactsBucket: storageStack.contactsBucket, env, }); diff --git a/backendAWS/lib/frontend_stack.ts b/backendAWS/lib/frontend_stack.ts index 6a336d5c641736ef716e493a382dea9bb04007cb..64bab4d62a145cb61b83a65629e7f9c1f4989960 100644 --- a/backendAWS/lib/frontend_stack.ts +++ b/backendAWS/lib/frontend_stack.ts @@ -5,14 +5,10 @@ import * as s3deploy from 'aws-cdk-lib/aws-s3-deployment'; import { S3StaticWebsiteOrigin } from 'aws-cdk-lib/aws-cloudfront-origins'; import { join } from 'path'; -interface FrontendStackProps extends cdk.StackProps { - contactsBucket: s3.Bucket; -} - export class FrontendStack extends cdk.Stack { public readonly cloudfrontDistribution: cloudfront.Distribution; - constructor(scope: cdk.App, id: string, props: FrontendStackProps) { + constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { super(scope, id, props); // Create an S3 bucket for the frontend diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 0000000000000000000000000000000000000000..327bd1af7597ba8eb86fdc46115ff497fe3e29ee --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,15 @@ +version: 0.2 + +phases: + install: + runtime-versions: + nodejs: 20 + commands: + - npm install + build: + commands: + - npm run build +artifacts: + files: + - '**/*' + base-directory: frontend/build