An open API service indexing awesome lists of open source software.

https://github.com/michimani/static-website-sample

This is a sample project of static web site hosted on S3 for TypeScript development with CDK.
https://github.com/michimani/static-website-sample

Last synced: 3 months ago
JSON representation

This is a sample project of static web site hosted on S3 for TypeScript development with CDK.

Awesome Lists containing this project

README

        

static-website-sample
===

This is a sample project for TypeScript development with CDK.
You can create a static web site hosted on S3 using this project.

# Usase

0. prepare

```console
$ npm install
$ cdk bootstrap
```

1. create config file

```console
$ cp stack-config.yml.sample stack-config.yml
```

Set environment variables in the following yaml format.

```yaml
common:
region: #eg: ap-northeast-1

route53:
zone: #eg: example.com
zone_id: #eg: ABCD123467890
sub_domain: #eg: static-website-sample (if you want to host this site as "static-website-sample.example.com")
```

You can check the values โ€‹โ€‹of `route53.zone` and `route53.zone_id` in the Route 53 management console.

2. build

```console
$ cdk synth
```

3. deploy

```console
$ cdk deploy
```

4. check

Access the domain you set up (rg: `static-website-sample.example.com`), and check if the web page is displayed correctly.