Skip to content

Commit 04ac0a5

Browse files
committed
simplify the Makefile target
1 parent 6a8e6ea commit 04ac0a5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ check:
1616
@command -v cdk > /dev/null 2>&1 || { echo "CDK is not installed. Please install CDK and try again."; exit 1; }
1717
@command -v cdklocal > /dev/null 2>&1 || { echo "cdklocal is not installed. Please install cdklocal and try again."; exit 1; }
1818
@command -v yarn > /dev/null 2>&1 || { echo "Yarn is not installed. Please install Yarn and try again."; exit 1; }
19+
@command -v aws > /dev/null 2>&1 || { echo "AWS CLI is not installed. Please install AWS CLI and try again."; exit 1; }
20+
@command -v awslocal > /dev/null 2>&1 || { echo "awslocal is not installed. Please install awslocal and try again."; exit 1; }
1921
@echo "All required prerequisites are available."
2022

2123
## Install dependencies
@@ -28,10 +30,12 @@ install:
2830

2931
## Build and deploy the frontend
3032
frontend:
31-
yarn prepare:frontend-local
32-
yarn build-frontend
33-
yarn cdklocal bootstrap --app="node dist/aws-sdk-js-notes-app-frontend.js"
34-
yarn cdklocal deploy --app="node dist/aws-sdk-js-notes-app-frontend.js"
33+
# yarn prepare:frontend-local
34+
# yarn build:frontend
35+
# yarn cdklocal bootstrap --app="node dist/aws-sdk-js-notes-app-frontend.js"
36+
# yarn cdklocal deploy --app="node dist/aws-sdk-js-notes-app-frontend.js"
37+
@distributionId=$$(awslocal cloudfront list-distributions | jq -r '.DistributionList.Items[0].Id') && \
38+
echo "Access the frontend at: http://localhost:4566/cloudfront/$$distributionId/"
3539

3640
## Deploy the infrastructure
3741
deploy:

0 commit comments

Comments
 (0)