Skip to content

Commit

Permalink
chore: add readme for example
Browse files Browse the repository at this point in the history
  • Loading branch information
tmokmss committed May 15, 2022
1 parent 5b1014b commit 47ba6e0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Then, the extracted directories will be located as the following:
└── module1 # extracted module1 assets
```

Please check https://github.com/tmokmss/deploy-time-build/tree/main/example for a complete example.
Please check [example directory](./example/) for a complete example.

## Why do we need this construct?
Previously, there are a few different ways to deploy frontend applications from CDK (1 and 2 below). But none is perfect with different pros and cons. This construct adds another option to deploy frontend apps.
Expand Down
9 changes: 8 additions & 1 deletion example/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
## How to Deploy
```sh
# Assume current direcotry is the example directory
# Assume current directory is the example directory
cd ../src/lambda/nodejs-build
npm ci
npm run build
cd -
npx cdk deploy
```

## Description
After a successfull deployment, you will get a CloudFront URL from the stack output.

![demo](../imgs/demo.png)

You can see the API endpoint is successfully injected to the sample frontend app.
Binary file added imgs/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 47ba6e0

Please sign in to comment.