- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch1/deploy-spa --path cncb-deploy-spa
- Navigate to the cncb-deploy-spa directory with cd cncb-deploy-spa.
- Review the file named serverless.yml with the following content:
service: cncb-deploy-spaprovider: name: awsplugins: - serverless-spa-deploycustom: spa: files: - source: ./build globs: '**/*' headers: CacheControl: max-age=300resources: Resources: WebsiteBucket: Type: AWS::S3::Bucket Properties: AccessControl: PublicRead WebsiteConfiguration: IndexDocument: index.html ErrorDocument: index.html Outputs: WebsiteBucketName: Value: Ref: WebsiteBucket WebsiteURL: Value: Fn::GetAtt: ...