The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
This library provides constructs for hosting Next.JS web applications built using open-next.
Supports versions: 12 and 13
npm install cdk-construct-nextjs
import { NextJs } from 'cdk-construct-nextjs';
new NextJs(this, 'handler', {
path: '../apps/website',
});
This construct assumes that the provided domainName
is the same as the hostedZoneId
.
import { NextJs } from 'cdk-construct-nextjs';
new NextJs(this, 'handler', {
path: '../apps/website',
domainName: 'example.com',
});
Existing hosted zones can be provided as an object.
import { NextJs } from 'cdk-construct-nextjs';
new NextJs(this, 'handler', {
path: '../apps/website',
domainName: {
domainName: 'example.com',
hostedZone: 'existing.com',
}
});
These constructs were inspired by or directly modified from many sources, primarily: