1.9.1 • Published 4 years ago

aws-cdk-static-site v1.9.1

Weekly downloads
1
License
GPL-3.0-only
Repository
gitlab
Last release
4 years ago

Aws-cdk static site construct

coverage report

An npm module exporting a configurable static site construct.

Installing

npm i aws-cdk-static-site

Basic Usage

import * as cdk from "@aws-cdk/core";
import StaticSite from "aws-cdk-static-site";

export default class StaticSiteStack extends cdk.Stack {
    constructor(scope: cdk.App, id: string, props: cdk.StackProps) {
        super(scope, id, props);

        new StaticSite(this, id, {
            domainName: "example.com",
            siteAssetsPath: "./exampleSiteDirectory"
        });
    }
}

Specifying a subdomain

You can specify a subdomain using the siteSubDomain property.

new StaticSite(this, id, {
    siteSubDomain: "www",
    domainName: "example.com",
    siteAssetsPath: "./exampleSiteDirectory"
});

Specifying constructs

You can specify which constructs will be used with the constructConfig property.

new StaticSite(this, id, {
    domainName: "example.com",
    siteAssetsPath: "./exampleSiteDirectory",
    constructConfig: {
        useRoute53: true,
        useCloudfront: true,
        useDeletableBucket: false
    }
});

The construct config specified above is the default.

Links

1.9.1

4 years ago

1.9.0

4 years ago

1.8.5

4 years ago

1.8.2

4 years ago

1.8.4

4 years ago

1.8.3

4 years ago

1.8.1

4 years ago

1.8.0

4 years ago

1.7.0

4 years ago

1.6.0

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago