How it works...

In this recipe, we improve on the Serving a single-page application from a CDN recipe by adding a custom domain name for the SPA. In serverless.yml, we added the hostedZoneId, domainName, and endpoint values. These values trigger the serverless-spa-config plugin to configure the WebsiteEndpointRecord in Route53, and set the Aliases on the CloudFront distribution.

Get JavaScript Cloud Native Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.