cdk-website
v0.0.5
Published
An AWS CDK construct to instantly deploy a static website on serverless infrastructure. Easy, fast, done.
Downloads
5
Maintainers
Readme
cdk-website
An AWS CDK construct to instantly deploy a static website on serverless infrastructure. Easy, fast, done.
Installation
Use the package manager npm to install cdk-website.
npm install cdk-website
Usage
import { Construct, Stack, StackProps } from '@aws-cdk/core'
import { WebsiteProps, Website } from 'cdk-website'
export class CdkStack extends Stack {
constructor(scope: Construct, id: string, props: StackProps) {
super(scope, id, props)
const websiteProps: WebsiteProps = {
domain: 'aws.com',
subdomain: 'awesome-cdk',
websiteFolder: '../website/dist',
indexDoc: 'index.html',
errorDoc: 'index.html',
}
new Website(this, `Website`, websiteProps).deploy()
}
}
Road map
- [ ] Add more tests
- [ ] Add support for only domain
- [ ] Add more configurable options if needed
Contributing
Contributions of all kinds are welcome and celebrated. Raise an issue, submit a PR, do the right thing.
To set up a dev environment:
- Clone repo
yarn install
Development workflow (change code and run tests automatically):
yarn test:watch
Build (like CI):
yarn build
Release new versions:
yarn bump
And then publish as a PR.