- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch4/cdn-dns --path cncb-cdn-dns
- Navigate to the cncb-cdn-dns directory with cd cncb-cdn-dns.
- Review the file named serverless.yml with the following content:
service: cncb-cdn-dnsprovider: name: awsplugins: - serverless-spa-deploy - serverless-spa-configcustom: spa: files: ... dns: hostedZoneId: Z1234567890123 domainName: example.com endpoint: app.${self:custom.dns.domainName}
- Update the serverless.yml file with your hostedZoneId and domainName.
- Install the dependencies with npm install.
- Run the tests with npm test.
- Review the contents generated in the .serverless directory: