Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Jan 15, 2018
1 parent 03f31d4 commit 988192f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
.nyc_output
.serverless
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,24 @@
[CloudFront (with Lambda@Edge)] -Restrict Bucket Access-> [S3 Origin Bucket] <-Sync- [Local src/*]
```

### Using plugin

- [serverless-plugin-cloudfront-lambda-edge](https://github.com/silvermine/serverless-plugin-cloudfront-lambda-edge)
- [serverless-s3-sync](https://github.com/k1LoW/serverless-s3-sync)

## Usage

### Config
### Install boilerplate

```
$ git clone https://github.com/k1LoW/serverless-static-hosting-with-basic-auth.git ./my-static-page
```

### Set Basic authentication USERNAME:PASS

Set Basic authentication config ( `handler.js` )

### Deploy
### Deploy stack

```
$ npm install
Expand All @@ -25,7 +36,7 @@ $ AWS_PROFILE=XxxxxXXX WEBSITE_S3_BUCKET_NAME=sls-static-basic npm run deploy
$ AWS_PROFILE=XxxxxXXX WEBSITE_S3_BUCKET_NAME=sls-static-basic npm run sync
```

### Remove
### Remove stack

```
$ AWS_PROFILE=XxxxxXXX WEBSITE_S3_BUCKET_NAME=sls-static-basic npm run remove
Expand Down
2 changes: 1 addition & 1 deletion serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ provider:
WEBSITE_S3_BUCKET_NAME: ${env:WEBSITE_S3_BUCKET_NAME, 'sls-static-basic'}

plugins:
- serverless-s3-sync
- serverless-plugin-cloudfront-lambda-edge
- serverless-s3-sync

custom:
s3Sync:
Expand Down

0 comments on commit 988192f

Please sign in to comment.